This is a discussion on "Domain alias redirection with PHP?" within the PHP Forum section. This forum, and the thread "Domain alias redirection with PHP? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Domain alias redirection with PHP?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
Domain alias redirection with PHP?
I've got 1 domain and 3 alias' pointing to that 1 domain. On the server is a forum and in the forum are several different categories of discussion (funny that).
Anyway, I want the main domain to point to the home page of the forum and the others to point to different categories. So, for example this domain: www.category1.com would be redirected to the category 1 forum url. Is there a way with PHP that I can find out how the user is getting to the site? Would a referer function work for this? If I can tell that the user typed in www.category1.com and was brought to www.mainforum.com then I could write a script to redirect to category 1 forum. Does that make sense? Any ideas? I've tried using
|
|
|
|
|||
|
Re: Domain alias redirection with PHP?
The HTTP_REFERER is for the previous page - the one from which your user followed a link to get to your site. The HTTP_HOST is the host name through which the current host was contacted.
We have several domains with the same main section and we bring in the following from an include file:
|
![]() |
| Tags |
| domain, alias, redirection, php |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Upload redirection | Ross | PHP Forum | 8 | Feb 28th, 2007 23:32 |
| redirection that is unnoticable. how? | christopher | Web Page Design | 10 | May 20th, 2006 17:23 |
| Not unique table/alias: 'q' | Gee Bee | Databases | 1 | Feb 5th, 2006 10:05 |
| redirection problem | iamzoli | PHP Forum | 12 | Apr 11th, 2004 08:48 |