PDA

View Full Version : Redirect Using .htaccess and ModRewrite


tomyknoker
06-04-2006, 01:11 AM
Hi All,

I am having a massive issue trying to re-direct my site. I can get modRewrite working on my server but this is exactly what i need to happen.

I have 2 domains pointing to my server:

http://www.domain.com (primary domain)
http://www.domain.com.au

If a user types in http://www.domain.com.au, I want it to automatically re-direct to http://www.domain.com... I know I do this using .htaccess and modRewrite just not sure of the exact code...

Any help would be fantastic! As I am stuck!

Thanks,
Tom

Kravvitz
06-04-2006, 02:03 AM
You can't do that with mod_rewrite.

You need to use the redirect directive instead. (http://www.javascriptkit.com/howto/htaccess7.shtml)

tomyknoker
06-04-2006, 05:16 AM
Nah for some reason that doesn't work... the address is http://www.thinkspirits.com.au, should re-direct to the .com version...

Joe
06-04-2006, 06:19 AM
http://www.javascriptkit.com/howto/htaccess7.shtml

Google is your friend ;)