Forum Moderators: phranque

Message Too Old, No Replies

Forward user depending on URL?

         

Doraemon

2:13 pm on Aug 30, 2007 (gmt 0)

10+ Year Member



Hi.

I am administering a website that has multiple domains and a server side adress (www.mydomain.com, etc. and www.myserver.com/mydirectory/).

A couple of scripts runing cause some trouble when some one visits the website via the server directory adress (www.myserver.com/mydirectory/).
Therefore, I was wondering if it was possible to forward these people to the correct domain URL (www.mydomain.com).

I'm not sure if the Apache forum is the right place to ask, but I thought this might be a good place to start.

Many thanks in advance!

jdMorgan

2:17 pm on Aug 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it is possible if there is a clear way to identify the terms you call "mydirectory" and if that "mydirectory" string is equivalent to the "mydomain" in "mydomain.example.com".

Is this the case?

Jim

Doraemon

12:59 pm on Sep 10, 2007 (gmt 0)

10+ Year Member



I have a sub-domain that points to the server directory.

The sub-domain is www.isr.tu-berlin.de
The server directory is www.tu-berlin.de/fb7/isr/

I would like to automatically forward the people who are using www.tu-berlin.de/fb7/isr/ to www.isr.tu-berlin.de.

g1smd

10:31 pm on Sep 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You might also wish to redirect the non-www requests too...

Defining the requirements before you start work is very important.

jdMorgan

11:20 pm on Sep 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, if the subdomain points to the server directory, I assume you mean that it points to the main domain's root directory. If that is the case, then there is likely some code already there that points sub.example.com to example.com/sub. It would be helpful if you could post that code.

Jim