Forum Moderators: open

Message Too Old, No Replies

Javascript Dual Redirecting

dual redirecting in javascript

         

AnimeNdx

4:05 pm on Aug 8, 2007 (gmt 0)

10+ Year Member



Hello, I am fairly new to javascripting and I have run into an issue with the domain server that I am currently running under. I have 2 registered domains; however, I want one to point to a specific folder in my webspace and another to redirect to a seperate website. The only way they offer any kind of Domain redirect is for another $8.00 a month on top of what I am already paying. I was wondering if anyone might know of a possible javascript that checks the url that the user typed in then redirects to another page accordingly. Maybe using a couple if/then statements. Thanks for any help you can give me and sorry if this has ever been posted before :(

WesleyC

6:59 pm on Aug 8, 2007 (gmt 0)

10+ Year Member



Javascript is a client-side technology; this issue really shouldn't be handled there or at the level of the domain provider. This should be handled at your server using Apache or IIS.

rocknbil

7:03 pm on Aug 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard AnimeNdx, you don't want to do this with Javascript. The best way of course would be to just have the two domains pointing to two separate hosted locations. Since you said "separate website," I would guess this is the best way. Otherwise, hopefully this is a Linux server, do a search for mod_rewrite.