Click to See Complete Forum and Search --> : Redirect Using .htaccess and ModRewrite


tomyknoker
06-03-2006, 11:55 PM
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

acemo
06-07-2006, 09:12 AM
im not good with .htaccess, but i know a way to do it in php.

index.php:

<?php header("Location: http://www.domain.com"); ?>