473,383 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

before authentication

Hello,

I have a site with a part that can only be accessed by users who are
logged in. I am displaying google ads there.

The problem is whenever the bot (Mediapartners-Google/2.1) tries to
access the page it is redirected to the login page. To optimize for
content related ads I like the bot to be redirected to the
topic-explanaion-page that is not protected.

My thought is to catch the request in global.asax and redirect the
googlebot to the relevant page with a server.transfer().

In wich event should I catch the bot. I think
Application_AuthenticateRequest:is to late, do I have to do it in
BeginRequest or is ther a better way?

Thanks.

Oct 15 '06 #1
1 1007
Anywhere that you can gain access to the Request.UserAgent property, you can
do what you want.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Johannes" wrote:
Hello,

I have a site with a part that can only be accessed by users who are
logged in. I am displaying google ads there.

The problem is whenever the bot (Mediapartners-Google/2.1) tries to
access the page it is redirected to the login page. To optimize for
content related ads I like the bot to be redirected to the
topic-explanaion-page that is not protected.

My thought is to catch the request in global.asax and redirect the
googlebot to the relevant page with a server.transfer().

In wich event should I catch the bot. I think
Application_AuthenticateRequest:is to late, do I have to do it in
BeginRequest or is ther a better way?

Thanks.

Oct 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Nick Messick | last post by:
I'm trying to modify a banner display function so it can be including on remote websites. If I just include the file from a remote website the code isn't executed before it is put into the page. ...
7
by: Larry Gillstrom | last post by:
Hi, I'm hoping someone on this forum can help me. I was wondering if it was possible to add/modify the authentication in the headers before redirecting the client to a new url. For example if...
8
by: Bob Everland | last post by:
I have an application that is ISAPI and the only way to secure it is through NT permissions. I need to have a way to login to windows authentication so that when I get to the ISAPI application no...
4
by: Kees | last post by:
A mail sent from a host to my smtp server is refused. This happens because you have to connect to a pop server before you can use the smtp server. Does anybody have any code to achieve this...
2
by: Franco Lombardo | last post by:
Hi all, I'm using DB2 Express 8.1 on windows 2000 professional. I set up local authentication(db2set db2_grp_lookup=local), and I created a local group MYGRP on my machine, which is now the...
9
by: Tom B | last post by:
In my web.config file I've specified Windows for the authentication, in IIS I've set it to Integrated Authentication. But my SQL connection is still showing Anonymous. Is there somewhere else I...
2
by: feng | last post by:
My users who try to access a page before login are redirected to my login page. Then after they successfully login, my login page will redirect the user to the page they intended to go through...
2
by: Patrick Olurotimi Ige | last post by:
Is it possible to execute a query or do some validation before loading a page.. I have a survey page and i want to validate users before loading the page. I have done it in the page_load. But...
2
by: Frank Swarbrick | last post by:
I am trying to understand "client authentication" works. My environment is DB2/UDB LUW 8.2 on zSeries SLES9 as the database server and DB2 for VSE 7.4 as the client. We currently have DB2/LUW set...
1
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, friends, Our have a .net 2003 website using c#.net. We want to let our users to have longer timeout time, and we did in Web.config: <authentication mode="Forms"> <forms...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.