|
| Web Hosting Deals | Holiday Logo Design | Webcam Chat | Website Header Templates | Register domain | Search Engine Optimisation | Web Hosting |
|
|||||||
| Programming / Scripting / Coding Got a question about : PHP / Perl / Java / JavaScript / CGI Scripts / JavaScript coding. Ask here! We'll get you the answers ! |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
||||
|
I recently just purchased another domain in addition to my original one. However, I have 1 IP address on my server and need to know how to redirect based on the site keyed in the address bar.
For example: If I type in 'site_1.com' I want it to go to 'site_1.com/site_1' OR 'site_2.com >>> site_2.com/site_2' I would also prefer to do this without JS. Help?
__________________
-RGStrat NEW WAVE APPAREL |
|
|||
|
You can use redirection for t, for example with html:
Code:
<meta content='1; ur=site_1/' http-equiv='refresh'> Code:
<?php
header("Location: http://site_1.com/site_1/");
?>
But you should also be able to just change the root directory for the site. Anyways, good luck ^^ Hope this helped ![]() |
|
||||
|
Thanks so much! The problem is I have 2 sites and I need it to go to 2 directories depending on what URL they typed in. I have seen this done with Javascript but so far it has not worked for me. Thanks though!
Quote:
__________________
-RGStrat NEW WAVE APPAREL |
|
||||
|
Any more suggestions?
__________________
-RGStrat NEW WAVE APPAREL |
|
|||
|
How about .htaccess ?
Redirect 301 /old.html http://yoursite.com/new.html |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|