.htaccess goals:
1) When someone goes to mysite.com/abc it should reroute to http://info.mysite.com/abc
2) Otherwise go to mysite.com/test
And in all cases keep all name value pairs for GETs
What I have isn't working - when I put in mysite.com/abc it redirects to http://www.mysite.com/info.mysite.com/abc instead of http://info.mysite.com/abc. Can you tell me how to fix what I have:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com\/abc$
RewriteRule ^/?$ "http\:\/\/info\.mysite\.com\/abc" [R=301,L]
RewriteCond %{HTTP_HOST} ^mysite\.com$
RewriteCond %{HTTP_HOST} !^info\.mysite\.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com\/test" [R=301,L]
# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php