Installation & Setup
This is the installation guide for the modular release of our
smart 404
404 management script. The most recent release of this script can be downloaded
from the projects
main page.
Although it might look like a complex procedure the installation and setup for our 404 script is
relatively quick & simple; most steps just need you to check that defaults will work for you,
while the remainder are simple one-line changes to tune the script for your website.
How to install and setup your custom 404 script
You'll find a step-by-step guide for installing & setting up your custom 404 error handler
below, the guide has been streamlined so it only contains elements relevant to using the single file install
- if you want to view the a different installation guide then they're available via the projects
main page.
-
Unpack the contents of the zip file to your local machine (or your development server if you
can edit files on that machine).
The file you need to make changes on is custom404-simple.asp as since
you've opted for the single file install, that's your single file.
-
Check
StripDefaultDoc() in has the default document names your plan on using
- it covers the common default document names for IIS, so hopefully you shouldn't need to edit
it too much unless you've switched to non-defaults.
If you do need to add extra default filenames then just copy & modify a sURI = Replace( ... )
line to match your own setup, replacing the existing filename with your default.
-
Now we need open up the correct include and make a few small changes so the script will be able
to access the data-source you've chosen to use.
Edit
Redirect_LoadRules, using the ReDirect_Add lines to built rules
specific to your site. The structure is quite simple, but if you need assistance then there's
a guide to creating inline rules available.
-
All the changes required should have been completed so we're ready to upload, as this is a single
file install you need to transfer your single file custom404-simple.asp
and it's supporting CSS information custom404.css.
-
Open up your IIS manager or hosting control panel and locate the Custom Errors tab - under
IIS you can find this by viewing the properties of a website with the available tabs going across
the top of the dialog.
When you've found the custom error list scroll down until you find the entry for the 404 and then
replace it with the URL to your newly uploaded 404. Under IIS this requires you to Edit Properties...
on the error you want to change, change the Message Type to "URL" and then key in the path
to your custom 404 script.
-
The script should now be installed.
Further reading
The installation and setup should now be complete, if you're unsure what each type of rules does
then you can consult the
inline rules guide which
gives examples of what each rule does and how you can use it.
For those feeling adventurous there's also a short guide to enabling semi-transparent
URL rewriting within the script.