Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Redirecting domain urls

Need som help from a mod_rewrite wizard



2:50 am on Nov 4, 2005 (gmt 0)

10+ Year Member

Ok, I have a domain.com, a domain.net, and a domain.org that all need to be pointed to [domain.com...] via a 301 redirect. That includes all www's as well.... so [domain.org,...] for example, would go to [domain.com...]

I could spend the next three hours trying to figure it out, but I was hoping one of you smart people could lend me a hand....




8:01 am on Nov 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hi spike2131,

I would guess if you used this search in your favorite SE:
redirect to a new domain 301 site:webmasterworld.com/forum92/


Visited this thread [webmasterworld.com] and read post #4.

You could find the answer already posted here numerous times =)

Then we would probably be very happy to help you if you get stuck with something you are trying to make work.

You might also visit the Apache Library [webmasterworld.com] and Forum Charter [webmasterworld.com] to get a better understanding of mod_rewrite.


BTW You can remove the third line of the code I suggested if the domains are all hosted separately, and the first line may or may not be necessary depending on server configuration -- you may need to test it both ways.


6:26 am on Nov 5, 2005 (gmt 0)

10+ Year Member

Thank you for point me toward a useful thread.

Its not that I'm to lazy to do a search of webmaster world for myself, its that there is so much different information available that I feel unqualified to separate out exactly what I need from the rest of what is out there. I've always been very poor at using regular expressions, so I appreciate the expretise of those who know better than me.




Featured Threads

Hot Threads This Week

Hot Threads This Month