httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Kruse" <...@secnet.dk>
Subject [users@httpd] mod_rewrite problems
Date Wed, 27 Nov 2002 09:10:52 GMT
Hey all,

I have a problemmet getting my rewrite rules to work correctly.
Here is my current ruleset:

RewriteEngine On
RewriteMap  lowercase  int:tolower
RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
RewriteCond %{REQUEST_URI} ^/stats/
RewriteRule  ^/(.*)$ /hosts/${lowercase:%{SERVER_NAME}}/stats/$1
php_admin_value open_basedir "/hosts/./:/tmp:/usr/local/lib"
RewriteRule  ^/(.*)$  /hosts/${lowercase:%{SERVER_NAME}}/public_html/$1
RewriteCond   /hosts/${lowercase:%{HTTP_HOST}}     !-d
RewriteRule   ^(.*)$    /hosts/index.html
RewriteCond  %{REQUEST_URI}  ^/cgi-bin/
RewriteRule  ^/(.*)$  /hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1
[T=application/x-httpd-cgi]

My dir structure
/hosts/
/hosts/some_domain/
/hosts/some_domain/public_html/
/hosts/some_domain/stats/

My problem is, when I access http://some_domain/stats then it tries to fetch
the files from /public_html/stats/ but I only want it to fetch it from
/stats/

Please help me with this problem

Regards

Jakob



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message