Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Redirect dead links to default.aspx

Reply
Thread Tools

Redirect dead links to default.aspx

 
 
Frankie
Guest
Posts: n/a
 
      10-04-2005
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!


 
Reply With Quote
 
 
 
 
rviray
Guest
Posts: n/a
 
      10-05-2005

Couldn't you replace the pointer to the Custom Error page that you
WebSite references

--
rvira
-----------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=421
View this thread: http://www.msusenet.com/t-187109933

 
Reply With Quote
 
 
 
 
Frankie
Guest
Posts: n/a
 
      10-05-2005
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" <> wrote in message
news:...
>
> 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
>



 
Reply With Quote
 
Peter Rilling
Guest
Posts: n/a
 
      10-05-2005
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" <> wrote in message
news:...
> 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" <> wrote in message
> news:...
>>
>> 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
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      10-05-2005
<customErrors mode="RemoteOnly" 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" <> wrote in message
news:...
> 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" <> wrote in message
> news:...
>>
>> 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
>>

>
>



 
Reply With Quote
 
Peter Rilling
Guest
Posts: n/a
 
      10-05-2005
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.dll. Therefore,
IIS will be the one throwing the 404, not ASP.NET.

"Juan T. Llibre" <> wrote in message
news:...
> <customErrors mode="RemoteOnly" 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" <> wrote in message
> news:...
>> 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" <> wrote in message
>> news:...
>>>
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      10-05-2005
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.dll. 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.dll.
I assumed that would be obvious. Maybe I shouldn't have.

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

<customErrors mode="RemoteOnly" 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.dll will redirect to default.aspx.

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



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" <> wrote in message
news:...
> 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.dll. Therefore, IIS will be the one
> throwing the 404, not ASP.NET.


> "Juan T. Llibre" <> wrote in message
> news:...
>> <customErrors mode="RemoteOnly" 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" <> wrote in message
>> news:...
>>> 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" <> wrote in message
>>> news:...
>>>>
>>>> Couldn't you replace the pointer to the Custom Error page that your
>>>> WebSite references?
>>>>
>>>>
>>>> --
>>>> rviray



 
Reply With Quote
 
Frankie
Guest
Posts: n/a
 
      10-06-2005
Yes - perhaps it should have been obvious to *me* too! But it wasn't (kinda
new to this).

Thanks all!

-F


"Juan T. Llibre" <> wrote in message
news:...
> 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.dll.
>> 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.dll.
> I assumed that would be obvious. Maybe I shouldn't have.
>
> Then, if the web.config entries are included as detailed :
>
> <customErrors mode="RemoteOnly" 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.dll will redirect to default.aspx.
>
> Thanks for pointing out that I should have included
> the reference to mapping the .asp extension to aspnet_isapi.dll.
>
>
>
> 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" <> wrote in message
> news:...
>> 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.dll.
>> Therefore, IIS will be the one throwing the 404, not ASP.NET.

>
>> "Juan T. Llibre" <> wrote in message
>> news:...
>>> <customErrors mode="RemoteOnly" 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" <> wrote in message
>>> news:...
>>>> 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" <> wrote in message
>>>> news:...
>>>>>
>>>>> Couldn't you replace the pointer to the Custom Error page that your
>>>>> WebSite references?
>>>>>
>>>>>
>>>>> --
>>>>> rviray

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dead TCP/IP Stack = DEAD VISTA !! Skybuck Flying Windows 64bit 15 09-23-2007 07:54 PM
daily python url - gmane links dead? K.S.Sreeram Python 0 06-13-2006 06:47 PM
OE dead links Jos. Wheeler Computer Support 1 04-15-2006 02:51 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Dead... the damn thing's dead... David Dean Computer Support 9 01-30-2004 02:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57