can RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php cause this problem

Author Message

kevin wei

Wednesday 26 November 2003 6:29:26 pm

if i active RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php
in httpd.conf
i will get error
"403 Forbidden
You don't have permission to access / on this server." in browser.

now i just want my ez can work.

help me,thnx!

Marco Zinn

Thursday 27 November 2003 2:33:09 am

Try to remove the / before the index.php.
Rewrite Rule Target should be relative to DocumentRoot (on Unix) or be the complete path in your servers Filesystem.
If you specify an absolute path (starting with /) , this refers to the harddisc of your webserver. And you don't have access to that part (Root directory) of the harddisc.
So, either use
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ index.php
or
RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ \your\path\to\document\root\index.php

Marco
http://www.hyperroad-design.com

kevin wei

Thursday 27 November 2003 5:40:13 pm

It is not the problem of this,i have done any format of this directory like index.php ,d:/server/ez/index.php or /index.php

when i uncomment RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ index.php ,all r the same error of 403

kevin wei

Friday 28 November 2003 2:55:28 am

i just want 127.0.0.1/index.php/news etc. can work, not remove index.php ,do need this setting in httpd.conf:
can RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /index.php
?

Tony Wood

Friday 28 November 2003 3:09:08 am

Hi Kevin,

Try adding RewriteRule !\.(gif|css|jpg|png|jar|js|html)$ /my/full/path/index.php

And then
DocumentRoot /my/full/path

This might be your problem... Of course check that the apache server has permissions to the file too.

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.