473,570 Members | 2,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conditional Page Re-direct


Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as
well. I would like to programmaticall y 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 1148
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******** *******@TK2MSFT NGP11.phx.gbl.. .

Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as well. I would like to programmaticall y 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.site 1.com"
Const SIT22="www.size 2.com"

Dim sSite
sSite = LCase(Request.S erverVariables( "SERVER_NAM E"))
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.ServerV ariables("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******** *******@TK2MSFT NGP11.phx.gbl.. .

Hello,

I have a 'primary' intranet website and a 'secondary' backup of this site as well. I would like to programmaticall y 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
3501
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 in a list box and submits the form the value is put into a session variable and the relevant page is displayed (in accordance to one of the list...
28
3424
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 <!> in the original MSDN documentation, but this is (although it is working) unfortunately non-validating gibberish. So I fooled around trying to...
8
12027
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 expressions are the same for all controls Under some undetermined circumstances, when such subform is displayed, the controls on the subform start...
2
1610
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 to database and get information using a querystring id and create a DataReader (as DR). - generate a Form to display using values from the database...
4
2794
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. Feature1=true,Feature2=false, ... VS2005 seems to either allow the existance of the constant or not. ie. You must omit a constant not declare it to be false ...
6
2067
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 web-site as I want it for "other browsers" but still have it presentable in IE. I understand why the conditional comment works, despite the subject...
16
3726
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 within another include so that it will, for example, appear in index.php but not in other result pages that use the same top level include. The...
1
2174
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
2579
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: <asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server"> <asp:FormView ID="FormView1" runat="server" Width="123px"...
7
2400
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 project. As you might expect the code outputs "DBC_CHECK_ALL is defined" when Check.Require(...) is called and the project is compiled with DEBUG...
0
7636
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...
0
7948
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7700
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6329
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...
1
5523
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3682
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...
1
2131
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
1
1238
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
971
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...

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.