| Author |
htaccess/mod_rewrite problem
|
|
| Leo Andrews 2006-11-28, 7:28 pm |
| Hi,
I have the following in an .htaccess file and for some reason it's
causing an error 500. Remove the .htaccess and all is well. Does anyone
have any thoughts as to what might be causing it?
Thanks
Leo
# Enable URI rewriting
RewriteEngine on
# Postprocessing of generated files
RewriteCond %{REQUEST_URI}
!^(/process\.php|/.*\.(png|gif|jpg)|/.*\.xml|/RSS2B3|/astracker|/images|/volvo2b4|/poster|/viposter|/r2b|/r4|/RSS2B4|/codelock\.php|/img2\.php|/img3\.php|/links\.php|/links_rnd2\.php|/links_rnd2\.php|/linksh\.php|/linksv\.php).*$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ /process.php?r=$1
| |
|
| "Leo Andrews" <leo@invalid.syntax> schreef in bericht
news:456c9973$0$136$7b0f0fd3@reader.news.newnet.co.uk...
> I have the following in an .htaccess file and for some reason it's causing
> an error 500. Remove the .htaccess and all is well. # Enable URI rewriting
> RewriteEngine on
>
> # Postprocessing of generated files
> RewriteCond %{REQUEST_URI}
> !^(/process\.php|/.*\.(png|gif|jpg)|/.*\.xml|/RSS2B3|/astracker|/images|/volvo2b4|/poster|/viposter|/r2b|/r4|/RSS2B4|/codelock\.php|/img2\.php|/img3\.php|/links\.php|/links_rnd2\.php|/links_rnd2\.php|/linksh\.php|/linksv\.php).*$
> RewriteCond %{REQUEST_FILENAME} -f
> RewriteRule ^(.*)$ /process.php?r=$1
Most likely mod_rewrite is not enabled on your server.
Check your error_log for details.
HansH
| |
| shimmyshack 2006-11-28, 7:28 pm |
| phew!!
to me some of that seems odd
for instance, you say if it doesnt start with [a whole load of things
that are not process.php] then redirect to process.php. This is
recursive surely,
not *.gif -> process.php
you need to tell it to stop there using [L] after the rewriterule.
Also the expression matches only requests to files. What about things
which are not files. I am assuming that process.php should handle them
too. maybe not though.
Anyway it does seem a rather extreme solution. Sure there's nothing
more elegant?
|
|
|
|