Hi, I need to find a way to have the rewriteBase change depending on the URL. for example, if the URL contains the string "sslserver" then the rewriteBase should be /oursite/. if the URL does not contain the string "sslserver" then the rewriteBase should be /. Does anyone know if this is even possible? cheers, StrobeNet
Post the original URL and how you want it. If you're just making the strings be directories, you don't need a rewriteBase for every one of them, just one.
Are you sure you can't do it with rewriteCond? Something like: RewriteCond %{REQUEST_URI} sslserver RewriteRule (.*) oursite/$1 [L] RewriteRule (.*) $1 Code (markup): Obviously the second rule is useless in that case, but I don't know what you want doing. First it checks the request for 'sslserver' and if it does contain that it rewrites to the directory 'oursite' and stops rewriting (L flag). Otherwise it carries on with the rewrite rules (no 'sslserver') and rewrites to the / directory instead.
Hi, I am unsure of the syntax for the following but this is how I would imagine it would look. RewriteCond %{REQUEST_URI} sslserver RewriteBase /oursite/ RewriteRule (.*) /oursite/$1 [L] RewriteCond %{REQUEST_URI} !sslserver RewriteBase / RewriteRule (.*) /$1 [L] So, I want to be able to change the rewriteBase depending on if the URL contains the string "sslserver";
A wise man once said.... Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)$ WHATEVER.php?WHATEVER=$1 [L] and change WHATEVER to WHATEVER it is in the original URL.
the RewriteRule is not the problem, that has been working fine the whole time, and I am able to change the RewriteRule depending on if the URL contains "sslserver" fine aswell. The problem is changing the RewriteBASE depending on the URL... I dont think I am going to get any answers here so I will be moving on... thanks anyway