|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > "Looks simple" : altering the "page can not be displayed" ms |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|