469,323 Members | 1,575 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Conditional Page Re-direct


Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as
well. I would like to programmatically have the effect that if the
primary site is (page not found 404) not available, for it to access the
secondary site or at least be able to add a message with (or instead of) the
404 error dialog that the primary site is down and give the user a link to
the alternative (secondary) site.

Appreciate your help.
--
Best Regards,
Mona Syed


Jul 19 '05 #1
2 1050
build a custom 404 page.
See www.aspfaq.com for more info on this.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Mona Syed" <ms***@jcpenney.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...

Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as well. I would like to programmatically have the effect that if the
primary site is (page not found 404) not available, for it to access the
secondary site or at least be able to add a message with (or instead of) the 404 error dialog that the primary site is down and give the user a link to
the alternative (secondary) site.

Appreciate your help.
--
Best Regards,
Mona Syed

Jul 19 '05 #2
Create a custom 404 page for your site.
(http://www.aspfaq.com/show.asp?id=2162)

You could probably use code as so:

<%

Const SITE1="www.site1.com"
Const SIT22="www.size2.com"

Dim sSite
sSite = LCase(Request.ServerVariables("SERVER_NAME"))
If Not Left(sSite, 4) = "www." Then sSite = "www." & sSite

If sSite = SITE1 Then
Response.Write "That page wasn't found. Maybe try <a href=""http://" &
SITE2 & REquest.ServerVariables("URL") & """>here</a>."
Else
Response.Write "That page wasn't found on this site either. Sorry about
that.
End If

%>

Ray at work

"Mona Syed" <ms***@jcpenney.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...

Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as well. I would like to programmatically have the effect that if the
primary site is (page not found 404) not available, for it to access the
secondary site or at least be able to add a message with (or instead of) the 404 error dialog that the primary site is down and give the user a link to
the alternative (secondary) site.

Appreciate your help.
--
Best Regards,
Mona Syed

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Benjamin Niemann | last post: by
8 posts views Thread by Dimitri Furman | last post: by
2 posts views Thread by estafford | last post: by
4 posts views Thread by Bob | last post: by
6 posts views Thread by patrick j | last post: by
16 posts views Thread by Alan Jones | last post: by
1 post views Thread by Brian | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.