PDA

View Full Version : tricky code


loki
07-10-2005, 13:21/01:21PM
can someone lend me a hand here?

due to an affiliate arrangement our site is duplicated, only difference s the header changes to the name of the affiliate.

i want to stop the spiderbots from indexing the affiliate version of the site but am not sure if this can be done via robots.txt

a 'good' url is
http://www.friendlyrentals.com/Start.aspx?CultureCode=fr-FR&RegionId=1&ControlConfig=0

a 'duplicate' url is
http://www.friendlyrentals.com/Start.aspx?CultureCode=fr-FR&RegionId=1&ControlConfig=1

(ie, the ControlConfig changes from 0 to 1)

can this be done?

thanks

polarmate
07-10-2005, 13:31/01:31PM
All bots do not recognize wildcards in the disallow string. Your most effective method would be to add a Robots meta tag set to nofollow when ControlConfig <> 0 using your asp code.

loki
07-10-2005, 14:13/02:13PM
not the answer i was expecting but will do nicely.

thankyou!

loki
07-10-2005, 14:14/02:14PM
polarmate,

wouldn't that be noindex ?

g1smd
07-10-2005, 14:28/02:28PM
You simply put some similar code to this on the page:

IF ControlConfig=1 THEN output '<meta name=\"robots\" content=\"noindex\">'

You should also do this on a site that has pages that are "print friendly".

JohnC
07-10-2005, 14:59/02:59PM
Another option since you are using .Net. Capture the referers and when the surfer comes in from your affiliate, set the ControlConfig parameter in your Global ASA file. That way you will only have one set of URLs and can still display a different header for your affiliate.

polarmate
07-10-2005, 15:35/03:35PM
:rolleyes: yes it should! Sorry, loki!

John, many personal firewalls and anti-virus software have 'block referrer info' set to yes by default. What you have suggested will work but not 100% of the time.

loki
08-10-2005, 06:24/06:24AM
thanks all.

g1smd
08-10-2005, 15:54/03:54PM
The meta tag version will work the best for all browsers and bots. It doesn't rely on anything other than what the URL called actually is.