![]() |
| How can my index.html redirect - per several domain names |
|
RobinGoodfellow
|
I own several domain names. All of them are mapped to the same root IP. How can I make the index.html in that root directory automatically redirect to Domain1Index.html or Domain2Index.html, etc., depending on wether the access is via www.Domain1.com or www.Domain2.com, etc ?
|
||||||||||||
|
|
|||||||||||||
|
Jason101
Forum Regular
|
|||||||||||||
|
|
|||||||||||||
| I'm on the Foundation Plan |
|
RobinGoodfellow
|
I'm on the Foundation plan. Is it possible to do it with PERL or CGI ?
..tom |
||||||||||||
|
|
|||||||||||||
| JS redirect |
|
darnold
|
On a foundation plan you can use javascript. Here is an example.
|
||||||||||||||
|
|
|||||||||||||||
|
Jason101
Forum Regular
|
Please confirm if you get this javascript version working, and I will move this post and sticky this topic for future reference since this is a frequently asked question
|
||||||||||||
|
|
|||||||||||||
| Doesn't seem to work |
|
RobinGoodfellow
|
I tried it but it doesn't work. I have it in index.html - and it is supposed to call a different page depending on whether the sender entered www.VictoriaLeeBlair.com or www.TomBlair.org
Check it out here: www.VictoriaLeeBlair.com/index.html thanks |
||||||||||||
|
|
|||||||||||||
| JS redirect |
|
darnold
|
The script is correct. It needs to be added to the head section of your html.
I added it to my site as an example. Browse to http://victoria.xclusivesites.com/ or http://tom.xclusivesites.com/ This is what I added. I modified it just slightly to make it xhtml happy but it is basically the same and both work.
|
||||||||||||||
|
|
|||||||||||||||
| Thanks |
|
RobinGoodfellow
|
You rock! Thanks for the all the work here. I'll check this out when I get home tonight.
..tom |
||||||||||||
|
|
|||||||||||||
| Ummm - one more follow-on |
|
RobinGoodfellow
|
Does Java work in the general scheme of things across the internet? How many people woudl you estimate have Java disabled or will have other problems crop up becuase of their configuration or browser - without having any idea of what is the problem?
|
||||||||||||
|
|
|||||||||||||
|
Jason101
Forum Regular
|
If you are on the foundation plan, ASP is enabled as per the plan details:
http://www.hostmysite.com/hosting/foundation/ Try using the ASP link I posted a few posts up. I'm not sure if PHP is enabled on foundation. To find out, create a page called phpinfo.php and put the following in it and run it:
If you get a big dump of stuff then PHP is enabled, and you can use the PHP code posted above as well. |
||||||||||||||
|
|
|||||||||||||||
| javascript |
|
darnold
|
JS works really well. It's great for a lot of things and very quick because it runs client side. It also works regardless of your hosting be it linux or windows. However you are correct it can be disabled and for that reason you should not rely on it for mission critical apps. For example. It is perfect for a first level of form validation but you should also use some sort of server side validation too. Javascript is commonly used all over the internet and most people do not disable it. I would go as far to say the average web user doesn't know how to or has any interest in disabling it. For the savy web guru Javascript can be disabled or even manipulated with the right tools. I say use it where you can but also use a server side script when it's important.
|
||||||||||||
|
|
|||||||||||||
| php |
|
darnold
|
php is not enabled on the foundation plan. but using asp would be better because it is processed on the server. asp is available on the foundation plan.
|
||||||||||||
|
|
|||||||||||||
| thanks |
|
RobinGoodfellow
|
You guys really are very helpful.
thank you so much. tom blair perkiomenville |
||||||||||||
|
|
|||||||||||||
| Closer - but still not quite |
|
RobinGoodfellow
|
Well I'm one step closer - but it goes to the default. At least it is executing the Java.
Could you look at http://www.VictoriaLeeBlair.com/ thanks again, ..tom |
||||||||||||
|
|
|||||||||||||
|
Connie
|
It doesn't look like you have something setup for http://www.VictoriaLeeBlair.com/ , so add something like
|
||||||||||||||
|
|
|||||||||||||||
| How can my index.html redirect - per several domain names |
|
||
|


