473,508 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grabbing referrer page on a redirected error page

doable?

Here's what we have:

If a page is not found on our site, we redirect to the custom error page.
I'd like to be able to grab the bad link, as well as the referrer page (to
know what page the bad link is on) and then email that information to me so
I can monitor and be alerted to any bad links on the site.

Is there a way to get the referrer even though this is a redirected page?

-Darrel
Nov 18 '05 #1
4 3878
the refer page (if not blocked by a proxy) would only be on the orignal
request to the missing link, you grab it then, before the redirect.

-- bruce (sqlwork.com)

"darrel" <no*****@hotmail.com> wrote in message
news:u3**************@TK2MSFTNGP09.phx.gbl...
doable?

Here's what we have:

If a page is not found on our site, we redirect to the custom error page.
I'd like to be able to grab the bad link, as well as the referrer page (to
know what page the bad link is on) and then email that information to me so I can monitor and be alerted to any bad links on the site.

Is there a way to get the referrer even though this is a redirected page?

-Darrel

Nov 18 '05 #2
HttpContext.Current.Request.UrlReferrer

It's not too reliable, proxy servers commonly rewrite it.
Nov 18 '05 #3
Hi darrel,
I think its doable.

Did u try to get the Referal URL by using

"Request.UrlReferrer" in the aspx page where you are showing the
error !

Hope this helps you to solve the problem.

THanks
Packiyanath.s.k

"darrel" wrote:
doable?

Here's what we have:

If a page is not found on our site, we redirect to the custom error page.
I'd like to be able to grab the bad link, as well as the referrer page (to
know what page the bad link is on) and then email that information to me so
I can monitor and be alerted to any bad links on the site.

Is there a way to get the referrer even though this is a redirected page?

-Darrel

Nov 18 '05 #4
HttpContext.Current.Request.UrlReferrer

It's not too reliable, proxy servers commonly rewrite it.


Perfect. That was easier than I thought!

Well, to be fair, it works locally...we'll see how well it does on the
transfer over to the load balanced servers... ;o)

-Darrel
Nov 18 '05 #5

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

Similar topics

1
1244
by: Srinivasan | last post by:
When I try to run the following URL : http://localhost/Duwamish7/default.aspx of Duwamish Online application, an error page appears with the following message : ...
7
2844
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current...
0
1591
by: Mark Phanides | last post by:
My ASP.NET application intermittantly (but always at same point) redirects to the 'Invalid Syntax Error' web page for some unknown reason. I've created a ASP.NET application written in VB.NET with...
3
1588
by: KJ | last post by:
Alright, I'm trying to display Ex.Message on a custom error page. Here is what I did. When an error occured I caught the error and saved it in a session variable and when the page redirected...
6
2294
by: dee | last post by:
Hi In web.config I have to the following: <configuration> <system.web> <customErrors defaultRedirect="error.htm" mode="On" /> </system.web> </configuration>
2
5016
by: Jan | last post by:
Is it possible to somehow redirect users to a cutom page if their browsers/firewall do not support SSL? Almost like a customized 404 page? We'd like to offer SSL form submits by default, but...
0
1487
by: ravescar | last post by:
I am currently working on an generic error collection mechanism in ASP.NET2.0 written using C# that can catch unhandled exception on a web application in application level. it automatically save an...
0
1524
by: cephelo | last post by:
Hello. I have a customErrors section set up in my asp.net's web.config file. All is fine and well when dealing with simple pages, e.g., /dir/pub/news/view.aspx, I get...
7
5040
by: DC | last post by:
Hi, there is a 500;13 page one can configure in the website properties, but ..Net Framework 1.1 also delivers the "server too busy" message sometimes and the IIS custom error page does not seem...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.