httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Donker <padon...@reporters.net>
Subject [users@httpd] Mod_Rewrite question
Date Wed, 25 Jun 2003 23:44:31 GMT
Hi guys,

1st of all, I'm a total newbe to both this mailinglist and mod_rewrite, 
so pardon me if I'm asking this question while it has been asked a 
zillion times before, or if it is the wrong place to ask it.
My problem is the following:

I'd like to define a DocumentRoot based on the referer. So, if referer 
would be http://www.somesite.com/, docroot should be 
/server/www.somesite.com. If ref is http://192.168.0.100, then 
/server/192.168.0.100.
My (non-functional) rule is:

RewriteEngine on
RewriteCond %{HTTP_REFERER}       !^http://www.somesite.com/$ [NC]
RewriteCond %(DOCUMENT_ROOT)    !^/var/www/html$
RewriteRule  ^/$1        /server/www.somesite.com [R,L]

Obviousely, this doesnt work...how DO I make it work???
Thanks for any hints

Patrick


---------------------------------------------------------------------
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