.htaccess mod_rewrite 301 redirect help please?
-
Hi, I have more than 1 domain name for my site, I want all variations of both (i.e. domain2.com, www.domain2.com, domain1.com) to point to www.domain1.com this is what i have in my .htaccess file: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^domain2.com[NC] RewriteRule ^(.*)$ http://www.domain1.com/%241 [R=301,L] RewriteCond %{HTTP_HOST} ^www.domain2.com[NC] RewriteRule ^(.*)$ http://www.domain1.com/%241 [R=301,L] RewriteCond %{HTTP_HOST} ^domain1.com[NC] RewriteRule ^(.*)$ http://www.domain1.com/%241 [R=301,L] this does not appear to be working, anybody have any ideas what I might try? (I also tried RewriteCond %{HTTP_HOST} ^domain2\.com[NC] -it does not seem to have made any difference) thanks a lot.
-
Answer:
Have you tried playing around with your DNS settings? This sounds like something that should be handled there. Mod_rewrites are usually for making URL extensions prettier. I believe you can adjust the A Name setting for the domains to point to domain1.com
Renegade at Yahoo! Answers Visit the source
Related Q & A:
- How to do lots of 301 Redirect (Tomcat?Best solution by Stack Overflow
- I did something really bad and now i need help please help me.Best solution by Yahoo! Answers
- Knee problems help please?Best solution by Yahoo! Answers
- The accounting cycle? Help please?Best solution by Yahoo! Answers
- Best free website maker help please?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.