You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Justin Koivisto <ju...@koivi.com> on 2004/12/16 19:21:27 UTC

[users@httpd] Conditional RewriteBase ?

I am trying to find a way to use a conditional RewriteBase. I need to 
define the RewriteBase based on what the %{HTTP_HOST} value is.

For instance, if I have a request for http://www.example.com I don't 
need to even set the RewriteBase. However, if I get a request for 
http://ssl.exmaple.com I need to set the RewriteBase to /ssl_dir

Unfortunately, I have no control over the server at all, and am limited 
to using the .htaccess file. Basically, they are two different machines 
with the same set of files set as DOCUMENT_ROOT (most likely one is an 
NFS mount or something).

My first attempt was to use a RewriteCond statement, but I quickly 
remembered that only applies to RewriteRule lines. I found one search 
result on Google that keyed on "conditional rewritebase", but that 
wasn't any help (a support forum where the OP was given a different 
method). None of other search engines I tried helped either...

Any help is greatly appreciated!

-- 
Justin Koivisto
http://www.koivi.com/


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