Is it possible to write some conditional "if" statements in htaccess based on the server name/path?
I know I can use <IfModule>
but that doesn't solve the problem when the development and production server are identical.
thanks
Is it possible to write some conditional "if" statements in htaccess based on the server name/path?
I know I can use <IfModule>
but that doesn't solve the problem when the development and production server are identical.
thanks
You can test the value of SERVER_NAME or DOCUMENT_ROOT:
RewriteCond %{SERVER_NAME} =foo
RewriteRule …
RewriteCond %{DOCUMENT_ROOT} =/path/to/document/root/
RewriteRule …