472,121 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,121 software developers and data experts.

I am not hurting anyone ... am I ? (page redirects).

Hi,

I recently read a lot about a topic called page hijacking. It seems
that you can steal page rank from search engines while doing a
redirect.

I reminded I had a code in some pages, where someone clicks a link on
my site, I first go to a page to save the link, then I have a redirect
to the site (I want to count this clicks out).

The code looks like :

if (Request.Params["target"] != null)
{

string target = Request.Params["target"];
string source = ConfigurationSettings.AppSettings["DomainName"]
string ClientIP;
ClientIP = Request.UserHostAddress;

trafficMgmt trafficMgmt = new mydomain.trafficMgmt();
trafficMgmt.AddClick(source, ClientIP, target);

Response.Redirect(target);
}

Could this code hurt the target site ?
Which code does this Response.Redirect to the browser ? Is it 301 or
302 ? Which is the effect on each code ?

Thanks in advance.

Nov 19 '05 #1
1 1722
With this setup, you actually have a much more serious problem than
potential effects on other folks' sites. Your site is currently allowing
redirection to any target URL provided in the query string. This means that
someone with malicious intent could attempt to get users who trust your site
to visit his site via use of a URL like the following:
http://www.yoursite.com/redirector.a...ww.badsite.com. Users who
trust your site are much more likely to click such a link than they would be
to click one that leads directly to the redirection target.

If you want to perform redirection tracking while avoiding this problem, you
have two main options:

1. Separate the navigation from the tracking (e.g.: by using <a> tags with
href pointing to the target URL and onclick event launching the tracking).
Since this will make it possible for at least some redirections to take
place without being tracked (e.g.: if client browser has javascript
disabled), this may not be suit your requirements particularly well.

2. Assign each target URL a unique identifier, then have your redirector
page map from the identifier to the target URL on the server prior to
redirection.

<cr************@hotmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hi,

I recently read a lot about a topic called page hijacking. It seems
that you can steal page rank from search engines while doing a
redirect.

I reminded I had a code in some pages, where someone clicks a link on
my site, I first go to a page to save the link, then I have a redirect
to the site (I want to count this clicks out).

The code looks like :

if (Request.Params["target"] != null)
{

string target = Request.Params["target"];
string source = ConfigurationSettings.AppSettings["DomainName"]
string ClientIP;
ClientIP = Request.UserHostAddress;

trafficMgmt trafficMgmt = new mydomain.trafficMgmt();
trafficMgmt.AddClick(source, ClientIP, target);

Response.Redirect(target);
}

Could this code hurt the target site ?
Which code does this Response.Redirect to the browser ? Is it 301 or
302 ? Which is the effect on each code ?

Thanks in advance.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by while_1 | last post: by
5 posts views Thread by Nazir | last post: by
reply views Thread by craigkenisston | last post: by
5 posts views Thread by mherman3 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.