.htaccess - How to create a redirect in HTACCESS for this subdomain with dynamic urls? -
how can redirect sub-domain has bunch of dynamic urls?
example:
http://**ca**.*main*.com/blogs?&blogpage=8&blogpage=3&blogpage=3&blogpage=1&blogpage=6
the other urls similar, except has different page , blog number etc.
basically, want redirect "ca" subdomain has /blog?
thanks jr
you can utilize rule first rule in root .htaccess
file:
rewriteengine on rewritebase / rewritecond %{http_host} !^(www\.)?domain\.com$ [nc] rewritecond %{query_string} blogpage=\d+ rewriterule ^blogs(/.*)?$ http://www.main.com/? [l,r=301]
.htaccess redirect wildcard-subdomain
No comments:
Post a Comment