Reputation: 183
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
Upvotes: 4
Views: 3925
Reputation: 655239
You can test the value of SERVER_NAME or DOCUMENT_ROOT:
RewriteCond %{SERVER_NAME} =foo
RewriteRule …
RewriteCond %{DOCUMENT_ROOT} =/path/to/document/root/
RewriteRule …
Upvotes: 5