.htaccess - htaccess redirect issue while redirecting subfolder to sub domain -
i need redirect subfolder subdomain using htaccess
i need redirect
example.com/test,
to https://user.example.com/test
i have below rule
rewriteengine on rewritecond %{http_host} ^(?:www\.)?example\.com$ [nc] rewriterule ^test/?$ https://user.example.com/test [r=301,l]
how modify rule satisfy above condition?
you can use:
rewriteengine on rewritecond %{https} off [or] rewritecond %{http_host} !^user\.example\.com$ [nc] rewriterule ^test/?$ https://user.example.com/test [r=301,l,nc,ne]
test in new browser avoid old cache.
Comments
Post a Comment