ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 5th, 2003, 04:36 AM
avivit avivit is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 136 avivit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 19 sec
Reputation Power: 8
Question "Looks simple" : altering the "page can not be displayed" ms

Hi

We have two websites:
1. On Internet
2. On INTRANET
Anyone with any internet account can access to the first site, but to enter to the 2nd, u need to have a special internet account (say, a certain supplier).

The general menu is on the Internet website, but one of the items in the sub-menu, links to a page On the INTRANET. If u r not authorized (=did not use the certain internet account), then u get the page "The page can not be displayed".

I'd like to replace this page with a "help" page that I will create (Btw - Better that the help page will be located on the general website).
How do I redirect the "page can not be displayed" to the help page, and of course, redirect it ONLY when the "page can not be displayed" page is there b/c of linking from this sub-menu, or b/c of trying to reach directly to the Intranet certain URL that this sub menu links to.

Thanks,
Avivit

Reply With Quote
  #2  
Old March 5th, 2003, 06:34 AM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I'm only guessing here, but this is how I would go about it.

I'll make the assumption that your running IIS5 on windows NT/2000

In that case go to the website in your internet information services panel from start->Administrative tools
right click on the website name and select properties.
Then select the tab for custom errors. Then select the error number you wish to change your nice help page to. (when you get the error look for a 4xx or 5xx number thats the page you will need to replace) I'm pretty sure you can place almost any url there so just make your help page an asp page.

From there, in the help.asp use Request.ServerVariabels("HTTP_REFERER") to determine if the page came from your site1 if not redirect to old error page and nobody will be the wiser (except for those who need to know)
__________________
--

ngibsonau

Last edited by ngibsonau : March 5th, 2003 at 06:37 AM.

Reply With Quote
  #3  
Old March 6th, 2003, 02:48 AM
avivit avivit is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 136 avivit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 19 sec
Reputation Power: 8
Btw - I have checked again and the error msg is:

Btw - I have checked again and the error msg is:

Gateway Timeout
The following error occurred:
Server unreachable


--------------------------------------------------------------------------------
Please contact the administrator.


(And not "page can be displayed". Sorry)

is it in the same custom error place u mentioned?
Do u know the error number?



Thanks. Your solution look god. I'll check it out

Reply With Quote
  #4  
Old March 6th, 2003, 12:27 PM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
The error you want to catch is error 504. There is no default error page for that on my IIS

I don't know if you can just make a file named

C:\WINNT\Help\Common\504.htm

It may or may not need a little more work to find out how to catch the 504 error. But in principle it should work the same. It is a server error so maybe it comes from a different server from yours?

You should be able to track it down though.

Reply With Quote
  #5  
Old March 7th, 2003, 10:24 AM
RayHogan RayHogan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: NJ, USA
Posts: 11 RayHogan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm also guessing too, but you may be able to offer a coding solution.

Assuming you have either an IP, or a cookie (server variable) that you can use to identify a particular user, you can dynamically modify the link based on the status of the variable/IP.

Psuedo code
if user=(ok for intranet) then
make internal link
else
make link to help screen
End if


Ray

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > "Looks simple" : altering the "page can not be displayed" ms


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway