apache - How to avoid "RewriteBase" -
i not want manually set rewritebase
in .htaccess
of every site. how can set relative, moving site root new location not require modification in it.
i read http://michael.orlitzky.com/articles/avoiding_rewritebase_with_mod_rewrite.php seems not applicable in .htaccess files. here example htaccess
:
adddefaultcharset utf-8 <ifmodule mod_rewrite.c> rewriteengine on rewritebase /test rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?_url=/$1 [qsa,l] </ifmodule>
one way avoid modifying rewritebase in different setups use symlinks create same name linked directory every where. , make sure have option set @ top:
options +followsymlinks