Avatar billede hanuman70 Nybegynder
03. februar 2000 - 15:05 Der er 1 kommentar og
1 løsning

404 sider på IIS4.0

Hvordan laver jeg mine egne 404 sider på en Internet Information Server 4.0????
Avatar billede hmau Nybegynder
03. februar 2000 - 16:01 #1
flg. help-text findes i IIS 5.0

Adding a Custom Error Message
Custom error messages can be in the form of a mapping to a file or to a URL. Either of these can be implemented by using the Custom Errors property sheet in the IIS snap-in.

To customize an error message by mapping to a file

Create a file that contains your custom error message and place it in a directory.
In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you would like to customize HTTP errors and then click the Properties button.
Select the Custom Errors property sheet.
Select the HTTP error that you would like to change.
Click the Edit Properties button.
Select File from the Message Type box.
Type the path and file name which points to your customized error message, or use the Browse... button to locate the file on your computer's hard disk.
Click OK.
To customize an error message by mapping to a URL

Create a file that contains your custom error message and place it in a virtual directory.
In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you would like to customize HTTP errors and then click the Properties button.
Select the Custom Errors property sheet.
Select the HTTP error that you would like to change.
Click the Edit Properties button.
Select URL from the Message Type box.
Type the URL which points to your customized error message by entering the path to the URL beginning with the virtual directory name.
Click OK.
Notes

If you have an ASP file defined to handle a custom error, the script is invoked as a URL which passes context. For example, if you have an .asp file called Handle405.asp which is defined to handle HTTP 405 errors, if a 405 error occurs when a user tries to access Example.htm, then the .asp file will be invoked as if the user had typed http://example.microsoft.com/handle405.asp?405;http://example.microsoft.com/example.htm in the Web browser.
If you are using static custom error files (HTML files), you should always use the File option. If you plan to develop an application (by using ISAPI or ASP) to handle errors, then use the URL option. Note that the error status is handed to the application in the URL parameters and it is the application's responsibility to set the HTTP header status; otherwise, the HTTP response status will be "HTTP 1.1 200 OK."
If you are using Internet Explorer 5.0 with Windows, then Internet Explorer may replace the following custom errors with its own HTTP error. If the file size of the custom error is smaller than the size listed, the custom error will not be used:
403, 405, 410 - must be greater than 256 bytes
400, 404, 406, 408, 409, 500, 500.12, 500.13, 500.15, 501, 505 - must be greater than 512 bytes

Avatar billede hmau Nybegynder
15. februar 2000 - 01:05 #2
kan du ikke godkende eller lukke spørgsmålet?
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester