ddantes
asked on
htaccess redirect subdomain to root directory
I need to 301 redirect www.mauivacationrental.com/MAU to www.mauivacationrental.com I tried this code, but it isn't working. Please advise.
#redirect /MAU to root directory
RedirectMatch 301 www.mauivacationrental.com/MAU(.*) www.mauivacationrental.com/$1
#redirect /MAU to root directory
RedirectMatch 301 www.mauivacationrental.com/MAU(.*) www.mauivacationrental.com/$1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to both experts. Edwin: are you saying that the .htaccess belongs in the subdomain folder, not in the root folder?
Use it in the main root folder and change the folder path to your folder name.
http://stackoverflow.com/questions/15818003/htaccess-redirect-from-subdomain-root-to-subdomains-folder-mod-rewrite-mod
http://stackoverflow.com/questions/13637933/htaccess-redirect-subdomain-to-root-domain