Jump to content

how to check if page has been loaded via URL forwarding


BillyT

Recommended Posts

Hi there

 

let's say I have a page called

 

www.mydomain.com/mypage.php

 

In mypage.php, how can I check if the page is being loaded via the url forwarding that most domain registrars provide?  ie if someone has registered

 

www.theirdomain.com

 

and pointed it at my page above, how can I tell?  All the php and javascript code I have tried just return mydomain.com

 

I hope that makes sense

 

Thanks in advance

Link to comment
Share on other sites

thanks for the reply.  I'm not sure if this would be adequate though, as there will be many times that users will follow a link to mydomain.com/mypage.php so the referrer would be set to another domain there as well.  Is that correct?

 

thanks again

Link to comment
Share on other sites

There is no way to differentiate how the user came from another URL. It will appear the same to your browser whether they were forwarded, or clicked through.

 

Actually, you could manually check each of the URLs that are coming into your site and see what happens.

Link to comment
Share on other sites

on one page make a MD5 checksum, and when u load a form u gotta check that MD5 and make sure it is equal to the previous one set. u gotta make the MD5 change each time the page is changed. when the browser is closed the MD5 expires. if u leave the page the MD5 changes. make sure the form is checking for the MD5 somewhere and you should be fine

Link to comment
Share on other sites

thanks for the replies.  Haku I have manually checked some links and found a couple of people using URL forwarding to make

 

mydomain.com/mypage.php

 

look like

 

theirdomain.com

 

My question is, can I put some javascript or php on mypage.php to see whether or not the domain in the url is equal to mydomain.com?  As I mentioned in my first post, everything I have tried still returns mydomain.com even though in the browser it says theirdomain.com.

 

Thanks again

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.