Is there a way to use the same version of an .htaccess file for different environments? When doing a rewrite for a permanent redirect, you need to use a fully qualified url. Something like:
RewriteCond %{QUERY_STRING} element1=one
RewriteRule index\.php http://www.domain.com/path [L,R=3开发者_StackOverflow中文版01]
Is there any way to use an environment variable for the domain? Other solutions?
Thanks for the help...
Could you use VirtualServer's on your Apache global configuration? Using VirtualServers you could get the same results without the need of an .htaccess file by changing the web server's root path or setting specific rewrite rules for each virtual server on apache's configuration file.
精彩评论