I’ve been trying to redirect a subdomain to a subdirectory through htacess..
I have a domain lets say sub.domain.com
and the directory domain.com/site/
I want to redirect sub.domain.com to domain.com/site not changing any url, simply redirecting in a SEO friendly way.
I’ve tried a redirect 301 rule but it doesn’t seem to have worked.
2
Answers
Try this in your .htaccess:
If that does not work, an alternative option is:
Some potential options for you using actual names:
You can use the following rule :
This will internally redirect
to