i'm looking for a way to set RewriteBase in my .htaccess depending on if my web runs locally or live.
it should be something like:
if(localhost) RewriteBase /mylocalweb/
if(www.mydomain.com) RewriteBase /
any ideas how to do it? thanks
i'm looking for a way to set RewriteBase in my .htaccess depending on if my web runs locally or live.
it should be something like:
if(localhost) RewriteBase /mylocalweb/
if(www.mydomain.com) RewriteBase /
any ideas how to do it? thanks
Use RewriteCond in front of your RewriteRule instead of fiddling with RewriteBase
See: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond