| | #1 |
| Active Warrior Join Date: 2010
Posts: 77
Thanks: 2
Thanked 3 Times in 3 Posts
|
Basically I want to redirect from a subdomain of one domain of mine to the top level of a completely different domain of mine. I've never been able to get the code right for some reason, could someone help me out with this? So basically www.examplesite#1.com/subdomain to www.examplesite#2.info Yes one's a .com and the other is a .info, don't know if that has anything to do with anything but if someone could spell it out how to do the redirect for me I'd appreciate it. |
| |
| | #2 |
| Probably yo' daddy Join Date: 2010
Posts: 145
Thanks: 3
Thanked 27 Times in 24 Posts
|
that is a subdirectory, not a subdomain...but that is beside the point. so, the page at www.examplesite#1.com/subdomain, create a php file index.php, or whatever you are using to access it. In that file put: <?php header("Location: http://www.examplesite#2.info"); ?> And nothing else...no html tags, nothing. If you want it moved permanently, you can add the 301 header: <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.examplesite#2.info"); ?> |
| |
| The Following User Says Thank You to BobJutsu For This Useful Post: |
| | #3 |
| Active Warrior Join Date: 2010
Posts: 77
Thanks: 2
Thanked 3 Times in 3 Posts
|
Ha sorry about that brainfart with the subdomain vs. directory, thanks for calling me out. Done and done, thanks man.
|
| |
|
| Bookmarks |
| Tags |
| redirect, simple |
| |