i working on website has multiple subdomains country1.example.com, country2.example.com etc. developing website in wordpress , want map subdomains particular pages. example subdomain india.example.com
want render example.com/countries/india
for have done following not working subdomains showing same hone page
rewriteengine on rewritecond %{http_host} ^(^.*)\.exapmle.com rewriterule (.*) countries/%1
how can using htaccess not @ aware of htaccess programming.
try this:
rewritecond %{http_host} !^(www)\. [nc] rewritecond %{http_host} ^(.*)\.example\.com [nc] rewriterule (.*) http://www.example.com/countries/%1/$1 [l]
it redirect india.example.com/test.html www.example.com/india/test.html
Comments
Post a Comment