httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Day" <>
Subject [users@httpd] RE: users Digest 3 Dec 2002 21:00:19 -0000 Issue 619
Date Tue, 03 Dec 2002 21:26:39 GMT
Thanks for the help, it's definetly using the rewrite rule now.

Unfortunately, it's doing it for everything in the domain, even, not just 404 files.

It triggers the rule and just keeps looping back to view.php .. I tried
messing with the rule a bit:

(one of the things I tried)
RewriteLog /path/to/my/log
RewriteEngine on
RewriteCond %{REQUEST_URI}/?$ !-f
#RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
RewriteRule (/.*)$1 [R,L]

but I can't seem to get it to go .. anyone else?  Thanks for the help!


On Tue, 3 Dec 2002, Chad Day wrote:
> RewriteEngine on
> RewriteCond %{REQUEST_URI} ^/([^/]+)/?$
> RewriteCond /usr/local/www/sites/$1 !-d [NC]
> RewriteRule /.*$1 [R,L]
> RewriteEngine Off

Hmmm... You're the second person I've seen using RewriteEngine On ...
RewriteEngine off.  Where are people getting that idea?  The RewriteEngine
off is overridding the rewriteEngine On and making apache ignore all the
rewriterules.  Get rid of it.

Also, if you want there to be anything in the $1, you'll need to replace
"/.*" with "/(.*)".

Finally, if you want something in the rewrite log file (good idea!),
you'll want a RewriteLog and RewriteLogLevel directive.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message