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.

eZ debug

Timing: Jan 31 2025 06:16:54
Script start
Timing: Jan 31 2025 06:16:54
Module start 'layout'
Timing: Jan 31 2025 06:16:54
Module start 'content'
Timing: Jan 31 2025 06:16:54
Module end 'content'
Timing: Jan 31 2025 06:16:54
Script end

Main resources:

Total runtime0.0123 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.6328151.2734
Module start 'layout' 0.00490.0021 739.906336.8203
Module start 'content' 0.00690.0040 776.726694.2813
Module end 'content' 0.01090.0013 871.007833.9922
Script end 0.0122  905.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002520.3802140.0002
Check MTime0.001310.2115140.0001
Mysql Total
Database connection0.00075.438110.0007
Mysqli_queries0.001915.095630.0006
Looping result0.00000.091310.0000
Template Total0.00108.110.0010
Template load0.00086.211610.0008
Template processing0.00021.858010.0002
Override
Cache load0.00054.425510.0005
General
dbfile0.00022.003880.0000
String conversion0.00000.066140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs