Forum Moderators: coopster

Message Too Old, No Replies

Redirects

         

prethip

9:52 am on Sep 27, 2007 (gmt 0)

10+ Year Member



i have a unique problem.

i own 2 domains...

say my-domain.com and my-domain.org

my-domain.com is hosted at yahoo domains(this is forwarded to the my-domain.org site) and i run a dedicated server where i host the .org domain...

The problem is, i want to redirect

my-domain.com/subdir/
to
my-domain.org/subdir

right now my-domain.com/subdir/ gets forwarded only to my-domain.org/

yahoo wont let me forward to anything but just the .org site...
is there way to do the forward i want to using $_SERVER['HTTP_REFERER'] to detect what the user typed in and use it to do a redirect based on location.header..

thanks.

Habtom

9:57 am on Sep 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I suggest you go for 301 redirects here. If you search for webmasterworld [google.com] you will find just what you wanted.

Habtom

prethip

10:15 am on Sep 27, 2007 (gmt 0)

10+ Year Member



can i do a 301 redirect at yahoo.. i asked them they say i cant.

PHP_Chimp

11:04 am on Sep 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can redirect then you will be able to choose either 301 or 302. Assuming it is a permanently redirect you want then that is a 301, if it is only a temporary thing then 302 redirect.
It sounds like you want a 301 redirect.

You could use the header [uk.php.net] function, but there is probably a better solution. If you can use .htaccess then that is a better solution.