Special redirection, how to do it please

Hi please read carefully

what i want is that when i check where a visitor came from in www.website1.com from the logs or statcounter it show me www.website2.com.

so i did a redirection in the .htacess of website2.com file like that

“Redirect permanent / http://www.website1.com

now to test :

  1. i added a link to website2.com in website3.com
  2. i clicked on website2.com from website3.com and i was redirected to www.website1.com
  3. problem: when i check the statcounter stats of website1.com it show me that visitors are coming from website3.com and dont show website2.com at all

please how do i do an automatic redirection which show that the visitors of website1.com are coming from website2.com

i hope u got the point, this is really important for me because i want to hide the source of the visitors of a site.


Let me get this straight. You are seeking to fool your website1.com access logs into thinking that someone was referred from website2.com, instead of website3.com where they originally came from?

You are basically asking us how you go about faking referral information, which suggests to me that you want to be a log spammer. If that is true, may I respectfully suggest that nobody helps you.

Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)

Wouldn’t it be easier and faster to just write a program to write bogus log records?

Or maybe merge the two logs and sed domain3.com into domain1.com?

There’s a lot easier ways to do this. If you’re going to LIE does it really matter?


god now that i dont even know what is log spamming, all i want to do is to hide the source of my visitors of one of my websites if u can help me its ok, if not please please dont assume things u dont know.

You are trying to mislead people by faking access logs. I cannot see any legitimate reason for doing this.

Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)

Hide the source of your visitors from who? From yourself? You want to falsify your logs. Why bother? If you don’t want information in your logs revealed, just don’t show them to anyone - problem solved.


u dont see any legit reason because u lake of imagination:
u really upset me

here is the story:

i have an affiliate who is installing a js code in my website, the earning is good, but i discovered that they are also tracking the visitors just like statcounter do, so i stopped their program untill i fix that.

why ? because i have a great free source of traffic and if they know where my visitors are coming from they wont need me anymore. they will just use my source of traffic which is a great idea that i discovered myself.

so what now ? will u appologize to me ? u are talking to a honnest man, i dont know what is log spamming , i dont spam, i dont even do any adult business or anything that is not moral.

and ur lucky i cant type very good in english to express my feeling toward u because am french but u really annoyed me
the next time if u dont own the answer to a question dont type shit in others threads please.

bye and thank u very muck u really helped me with my problem with ur answers.

That’s an interesting idea. Let us know if you get it worked out. I’ve never had the need to do it, but it certainly looks like you have.


yes sure, if someone help me or i find how to fix that i’ll share the solution here.

There is no reason to be upset - you just didn’t make it very clear what you are trying to do. It doesn’t sound from your last post that you want/need a re-direct at all, but rather you want a way to “strip” referrer information from your visitors’ browser requests - I know of no way to do that with a re-direct.

If a browser comes to your site with referrer information intact, while you can re-direct that request to other places and decide whether or not to allow the access (among other things) based on the referrer information, unless you want to set up a proxy to forward the requests through, the browser contained referrer info will still be intact.

If you were to receive all requests at a proxy and redirect them all to your actual site where you affiliate javascript code is located, then the logs/counter/etc will show the proxy as the referrer, which would meet your goal, I think.

Your description of you original problem made it look as though you wanted to “falsify” your own logs (which, by the way, DH owns - and has every right to have a a record of your site’s activity) - you should not be surprised if someone declines to help you with that.


I apologize for upsetting you. That was not my intention. You have to understanding that faking referral data is an extremely common way to spam log files. This is done to promote a website and elevate its search engine ranking. Any technique that seeks to manipulate HTTP requests to hide information is generally considered to be a bad thing, unless it is done for reasons of security.

The referrer information (if any) is created by the web browser, so I’m not sure how you can do anything that will effect what a user’s browser will report. Perhaps we may be able to help if you post the affiliate’s JavaScript here.

Simon’s website
Save $100 on 1-year plans with promo code [color=#CC0000]SCJESSEY100[/color] (details)

thanks man , but it must be an easiest way to do that and i do need a redirection because look:

if someone go for example to www.mywebsite2.com and click on mywebsite1.com then when i check on stat counter i will see www.mywebsite2.com as a referrer

now in “my source of traffic” i will give the link mywebsite2.com instead of mywebsite1.com, i just need something to automate the redirection and in the same time have mywebsite2.com as a referrer because with a classic


it dont show mywebsite2 at all and show the real source of the traffic in the logs of mywebsite1.com :confused:

Assuming their browser is passing referrer information, that is correct.

[quote]…because with a classic


it dont show mywebsite2 at all and show the real source of the traffic in the logs of mywebsite1.com :/[/quote]
That is also correct - all a re-direct does is change the destination - it does not alter the referrer in the browser -


okey what about that
creating a real page on www.mywebsite2.com and setting it as the index then writing in this page a little js script that will do the redirection, do u think this will work , because in that case the visitors will load a real page even if its purpose is just to do the redirection.
also if u think it will work, i’ll need some help with the js code because i have no idea how to do a redirection with javasctipt :slight_smile:

Did you even try the old HTML meta-refresh trick, and check to see what referrer is passed…that might work.


cant believe i forgot that, i will try now and tell u if its working

PROBLEM SOLVED thanks rlparker!

with HTML meta-refresh tags the redirection is done and even if i dont see www.mywebsite2.com in the statcounter logs i see “No referring link” which is even better than what i wanted in the beginning

thanks to everybody who helped and take care :)!

I thought that might work…at least it seems to be the easiest. The referrer is browser based - and the meta-refresh generally strips it. :wink:

Note that this may not be the best solution, as search engines can penalize you for injudicious use of meta-refresh, but that is another subject. This method, at least, addresses your immediate desires. Good Luck!


thanks a lot

Good luck. Don’t use you newly found power for evil or we will hunt you down and shove a large duck up your backside. (grin)