473,802 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect dead links to default.aspx

I just acquired a new customer who had an existing ASP classic Web site.
When I took over, I transferred all content to ASPX pages that have
different page names than the prior Web site had. I kept the original domain
name. Of course, google and other search engines indexed the old site. So,
while all links from search results will come to my new ASPX site, the links
will be dead because of the changed page names (and I'm not about to go with
the old page names). So, I'd like to have some way for any/all links to the
site's old page names to result in the visitor being redirected to
default.aspx instead of receiving the "page not found" error.

How can I do this?

Thanks!
Nov 19 '05 #1
7 2098

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871099333

Nov 19 '05 #2
You mean the one specified in Web.config? Yes - I could, but I don't want
*all* exceptions to result in the user seeing default.aspx. Rather, I want
them to get default.aspx *only* when they request a page name that no longer
exists in the site.

Any ideas for getting that to happen?

-F

"rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871099333

Nov 19 '05 #3
I have not done this but you might be able to replace the IIS 404 page with
one of your own. Then you could add some kind of redirect command that will
push the browser to default.aspx.

"Frankie" <Be***********@ TacoTime.net> wrote in message
news:uu******** *****@tk2msftng p13.phx.gbl...
You mean the one specified in Web.config? Yes - I could, but I don't want
*all* exceptions to result in the user seeing default.aspx. Rather, I want
them to get default.aspx *only* when they request a page name that no
longer exists in the site.

Any ideas for getting that to happen?

-F

"rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871099333


Nov 19 '05 #4
<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========

"Frankie" <Be***********@ TacoTime.net> wrote in message
news:uu******** *****@tk2msftng p13.phx.gbl...
You mean the one specified in Web.config? Yes - I could, but I don't want *all*
exceptions to result in the user seeing default.aspx. Rather, I want them to get
default.aspx *only* when they request a page name that no longer exists in the site.

Any ideas for getting that to happen?

-F

"rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871099333


Nov 19 '05 #5
This won't work for his case because he siad that the original pages were
legacy ASP pages which is not handled by the aspnet_isapi.dl l. Therefore,
IIS will be the one throwing the 404, not ASP.NET.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OD******** *****@tk2msftng p13.phx.gbl...
<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========

"Frankie" <Be***********@ TacoTime.net> wrote in message
news:uu******** *****@tk2msftng p13.phx.gbl...
You mean the one specified in Web.config? Yes - I could, but I don't want
*all* exceptions to result in the user seeing default.aspx. Rather, I
want them to get default.aspx *only* when they request a page name that
no longer exists in the site.

Any ideas for getting that to happen?

-F

"rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871099333



Nov 19 '05 #6
re:
This won't work for his case because he said that the original pages were legacy ASP
pages which is not handled by the aspnet_isapi.dl l. Therefore, IIS will be the one
throwing the 404, not ASP.NET.
Peter,

*All* his pages are now *.aspx files.

All he needs to do is map the .asp extension to the aspnet_isapi.dl l.
I assumed that would be obvious. Maybe I shouldn't have.

Then, if the web.config entries are included as detailed :

<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>

When a request for any *.asp extension file comes in,
aspnet_isapi.dl l will redirect to default.aspx.

Thanks for pointing out that I should have included
the reference to mapping the .asp extension to aspnet_isapi.dl l.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Peter Rilling" <pe***@nospam.r illing.net> wrote in message
news:ei******** *****@TK2MSFTNG P10.phx.gbl... This won't work for his case because he siad that the original pages were legacy ASP
pages which is not handled by the aspnet_isapi.dl l. Therefore, IIS will be the one
throwing the 404, not ASP.NET. "Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OD******** *****@tk2msftng p13.phx.gbl...
<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========

"Frankie" <Be***********@ TacoTime.net> wrote in message
news:uu******** *****@tk2msftng p13.phx.gbl...
You mean the one specified in Web.config? Yes - I could, but I don't want *all*
exceptions to result in the user seeing default.aspx. Rather, I want them to get
default.aspx *only* when they request a page name that no longer exists in the site.

Any ideas for getting that to happen?

-F "rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...

Couldn't you replace the pointer to the Custom Error page that your
WebSite references?
--
rviray

Nov 19 '05 #7
Yes - perhaps it should have been obvious to *me* too! But it wasn't (kinda
new to this).

Thanks all!

-F
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:eA******** ******@TK2MSFTN GP09.phx.gbl...
re:
This won't work for his case because he said that the original pages were
legacy ASP pages which is not handled by the aspnet_isapi.dl l.
Therefore, IIS will be the one throwing the 404, not ASP.NET.


Peter,

*All* his pages are now *.aspx files.

All he needs to do is map the .asp extension to the aspnet_isapi.dl l.
I assumed that would be obvious. Maybe I shouldn't have.

Then, if the web.config entries are included as detailed :

<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>

When a request for any *.asp extension file comes in,
aspnet_isapi.dl l will redirect to default.aspx.

Thanks for pointing out that I should have included
the reference to mapping the .asp extension to aspnet_isapi.dl l.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Peter Rilling" <pe***@nospam.r illing.net> wrote in message
news:ei******** *****@TK2MSFTNG P10.phx.gbl...
This won't work for his case because he siad that the original pages were
legacy ASP pages which is not handled by the aspnet_isapi.dl l.
Therefore, IIS will be the one throwing the 404, not ASP.NET.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:OD******** *****@tk2msftng p13.phx.gbl...
<customErrors mode="RemoteOnl y" defaultRedirect ="/error.aspx">
<error statusCode="403 " redirect="/denied.aspx" />
<error statusCode="404 " redirect="/default.aspx" />
</customErrors>
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========

"Frankie" <Be***********@ TacoTime.net> wrote in message
news:uu******** *****@tk2msftng p13.phx.gbl...
You mean the one specified in Web.config? Yes - I could, but I don't
want *all* exceptions to result in the user seeing default.aspx.
Rather, I want them to get default.aspx *only* when they request a page
name that no longer exists in the site.

Any ideas for getting that to happen?

-F "rviray" <rv***********@ no-mx.msusenet.com > wrote in message
news:rv******** ***@no-mx.msusenet.com ...
>
> Couldn't you replace the pointer to the Custom Error page that your
> WebSite references?
>
>
> --
> rviray


Nov 19 '05 #8

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

Similar topics

2
6017
by: news://news.microsoft.com/microsoft.public.de.germ | last post by:
Hallo! Ich habe ein Frameset mit 3 Frames. Im 1. Frame wird eine ASPX-Seite geöffnet. In dieser werden einige Steuerelemente angezeigt. Nun soll bei bestimmten Benutzeraktivitäten eine andere ASPX-Seite geöffnet werden, und zwar in einem der beiden anderen Frames. Mein Problem ist, dass die Seite, die geöffnet werden soll, manchmal im 2. und manchmal im 3. Frame angezeigt werden soll (je nach Benutzeraktivität).
5
2219
by: Trisha | last post by:
I have a navigation user control navig.ascx that redirects to respective pages based on webcontrols.linkbutton clicks using response.redirect. I would like to control the look and feel of those link buttons. Once I click the button, I would like to make it bold using instructions like linkbutton.font.bold=true This works as long as its NOT followed by response.redirect
3
5524
by: ad | last post by:
Hi, The default document of IIS Virtual directory is Default.htm(not Default.aspx) Coud we use Default.htm to redirect to another page (like redirect to Default.aspx)?
3
2650
by: Will Chamberlain | last post by:
For the next couple of months I am hosting 2 domains with one host (Brinkster). What I have done is setup a page called default.aspx and a select case for SiteNameURL = Request.ServerVariables("SERVER_NAME"). The only way I can get this to work is to use Response.Redirect for one of the domains. I can include a file (Index.aspx) just fine for domain B. When I attempt to include a file for Domain B I get errors such as: The Connection...
7
2704
by: cpnet | last post by:
I've figured out how to use the <customErrors/> element in my web config file to to redirect 404 errors to a custom error handler. But, it displays an 'ugly' URL in the client's browser. For example, if someone browses to: www.mydomain.com/Users/BobJones/ then my app should display a page with info about Bob Jones. www.mydomain.com/Users/ is a real folder on my website that only contains a single file (default.aspx). I've configured...
0
1321
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
Helloz iam working in a web application for univesity. ihave diffrent kind of roles like: 1-Studetn Affairs 2-Staff imake three sperate master pages for them.: example:
1
1680
by: =?Utf-8?B?U2VtU2Vt?= | last post by:
Helloz iam working in a web application for univesity. ihave diffrent kind of roles like: 1-Studetn Affairs 2-Staff imake three sperate master pages for them.: example:
10
9025
by: Eirik Eldorsen | last post by:
How can I 301 redirect www.example.com/default.aspx to www.example.com without using ISAPI filters?
7
8169
by: seanmatthewwalsh | last post by:
Hi I have a page (default.aspx) that pulls it's HTML from a database. I then have a "content management" page (editpage.aspx) that allows the user to edit the HTML in the database. When the user clicks the save button on editpage.aspx, the page updates the database and then redirects to the default.aspx page.
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10303
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10061
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9111
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.