By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,947 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,947 IT Pros & Developers. It's quick & easy.

Redirect referral link

P: n/a
Hello,

Is it possible to transfer a redirected link to a sub page on my website?

Example:

www.mydomain.com -----> Page with webhosting

www.my2domain.com ----> directly points to www.mydomain.com

When people come from my2domain.com the must be directly reffered to a
subpage instead of the standard homepage.

Note: The won't come there by pressing a link but are directly being
directed by a domainpointer.

Greetz Roland.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ivo
"Roland" <rs*****@tiscali.nl> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hello,

Is it possible to transfer a redirected link to a sub page on my website?

Example:

www.mydomain.com -----> Page with webhosting

www.my2domain.com ----> directly points to www.mydomain.com

When people come from my2domain.com the must be directly reffered to a
subpage instead of the standard homepage.

Note: The won't come there by pressing a link but are directly being
directed by a domainpointer.

Greetz Roland.


Sure, just see what value is stored in the variable
window.document.referrer. For example:
if (document.referrer.indexOf('my2domain')>-1)
location.replace('subpage.htm');
If you can, you should do this on the serverside to minimize unnecessary
webtraffic. Your users don't need to notice they are being rerouted.
Also, the referer variable may be empty if they surf in from a javascripted
link, or from their Favorites menu.
HTH
Ivo
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.