how to redirect specific subfolders to subdomain with .htaccess -
i want redirect subfolders subdomain .htaccess. on webpage, have lot of subfolders begin "page" below:
http://example.com/page-one http://example.com/page-two http://example.com/page-three
so want achieve this:
http://page-one.example.com http://page-two.example.com http://page-three.example.com
i did research , way should work this:
rewritecond %{http_host} ^example\.com$ [or] rewritecond %{http_host} ^www\.example\.com$ rewriterule ^page-one\/?(.*)$ "http\:\/\/page-one\.example\.com\/$1"[r=301,l]
but doing way, have write lot of rules redirecting. there way can "catch" subfolders in name "page" appears , redirect complete folder subdomain?
Comments
Post a Comment