Redirect

J

jonathanthio

Hi,

I have a script called rd.js stored in http://nudelivelady.com/naked

It contains one line

this.location = "http://naked.nudelivelady.com"

Now, many websites access that script. Any website that access that
script will be redirected to http://naked.nudelivelady.com

The problem is I don't know which websites access that script. Because
when I check the webstats, the referrer is not noted due to the
redirect.

For example,
http://domain.com/blabla.htm

redirects to http://naked.nudelivelady.com

However, if I check the referrers in webstats, I wouldn't see
http://domain.com/blabla.htm

How should I modify rd.js so I can see the referrer?
 
G

Grant Wagner

Hi,

I have a script called rd.js stored in http://nudelivelady.com/naked

It contains one line

this.location = "http://naked.nudelivelady.com"

Now, many websites access that script. Any website that access that
script will be redirected to http://naked.nudelivelady.com

websites parse and execute the client-side JavaScript you are including?
Interesting. If you mean that Web sites contain links to that resource
that people click on, then you are depending on them having client-side
JavaScript enabled for your code to work.
The problem is I don't know which websites access that script. Because
when I check the webstats, the referrer is not noted due to the
redirect.

For example,
http://domain.com/blabla.htm

redirects to http://naked.nudelivelady.com

However, if I check the referrers in webstats, I wouldn't see
http://domain.com/blabla.htm

How should I modify rd.js so I can see the referrer?

The HTTP REFERER is sent at the whim of the user agent, there is no
requirement for any user agent to ever send you a REFERER, or if it does
send you a REFERER, that it is the correct one.

Anyway, the solution is not to "fix" the client-side JavaScript, the
solution is to fix your server so that requests to
http://yourdomain.com/somepath translates to
http://somepath.yourdomain.com.

This could be accomplished using virtual servers or mod_rewrite in
Apache for example. Either of those solutions should preserve whatever
REFERER the user agent chooses to send you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top