Solved

htaccess redirect subdomain to root directory

Posted on 2014-09-02
4
352 Views
Last Modified: 2014-09-03
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
0
Comment
Question by:ddantes
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
Edwin Hoffer earned 500 total points
ID: 40300322
Add below code in your .htaccess file which is in the folder:

redirect 301 /folder /index.php or index.html or domain name

Open in new window


Change your index file extension or use domain name.

Also if you have many files in the folder then you have to redirect all pages by using 3.1 code.

Thanks
Edwin
0
 
LVL 5

Expert Comment

by:Omid Omarkhail
ID: 40300428
0
 

Author Comment

by:ddantes
ID: 40301595
Thanks to both experts.  Edwin:  are you saying that the .htaccess belongs in the subdomain folder, not in the root folder?
0
 
LVL 13

Expert Comment

by:Edwin Hoffer
ID: 40302691
Use it in the main root folder and change the folder path to your folder name.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now