473,405 Members | 2,176 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,405 software developers and data experts.

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 1144
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Guy Hocking | last post by:
Hi there, I have a problem in my ASP/SQL Server application i am developing, i hope you guys can help. I have a ASP form with list boxes populated by SQL tables. When a user selects a value...
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
8
by: Dimitri Furman | last post by:
Given: Access 2002/2003 A subform in datasheet or continuous view, placed on a tab page (this last may or may not matter) Conditional formatting applied to some controls on the subform - format...
2
by: estafford | last post by:
I am having trouble writing a conditional block using ASP.NET and C#. I am trying to do something like this: 1. if page is PostBack - transfer to another page 2. if not postback - connect...
4
by: Bob | last post by:
Hi, In VS2003 conditional compilation constants and their state could be defined at project level. I was using this to control what features where offered by various builds. i.e....
6
by: patrick j | last post by:
Hi I've been testing out the "Conditional Comment" for IE. This is because for my web-site I want to have two style sheets, one for IE 6 and one for other browsers. Thus I hope to have my...
16
by: Alan Jones | last post by:
Hello everyone, any help would be greatly appreciated. :) What I'm trying to do may not be advisable, but here goes... I want a page named signature.php to appear conditionally as an include...
1
by: Sagaert Johan | last post by:
Hi Is there a constant i could use to force conditional compilation based on whether i compile for CF or the Full NET framework ? Johan
1
by: Brian | last post by:
I have an ASP.NET page that uses a FormView and SqlDataSource. Within my page I want to change a string if a column within my database record is a certain value. Here is some sample code: ...
7
by: Frank Munsberg | last post by:
Hi There, I'm currently in a mild state of confusion about the Conditional Attribute. The code below is taken from the implementation of "Design By Contract" that I've put in somewhere in my...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...
0
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
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,...
0
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...

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.