Home
Name Modified Size InfoDownloads / Week
naths-smart404-readme.txt 2011-06-20 4.2 kB
Naths-Smart404.zip 2011-06-20 89.6 kB
Totals: 2 Items   93.8 kB 0
Nath's Smart 404 Introduction:

This script has been coded to give a custom feel to your 404 pages and should only take a maximum of about 5 min to install if you fully use it and all its extras including the custom onsite search engine.

If you open smart404.php you will notic that I have coded the script to work with some different search options which have been commented to tell you which is for which for easier customization :)

Nath's Smart 404 with Google Search Box Installation:

1. First of you will need to add the following into your .htaccess file:

ErrorDocument 404 /smart404.php
ErrorDocument 400 /smart404.php
ErrorDocument 403 /smart404.php
ErrorDocument 500 /smart404.php

This is to tell your server to use the smart404.php page for the error pages above (please google to see what each is for, if you dont know).

2. Go to http://www.google.com/cse/manage/all to create your own custom onsite google search. Dont worry about any of the settings or customization, you only need to enter a name and your websites url as we are all only after the unique search code for your custom google search which should look something like this: var customSearchControl = new google.search.CustomSearchControl('012869460898643755040:edbzisboq54'); and its the code in ('') you need to change in smart404.php (its been commented for you in the smart404.php file so dont worry about a thing).

3. Once you have added your Google Search Code to smart404.php you simply need to upload smart404.php and all the file inlcuded in the .zip to your root folder and your all done, now goto yourdomain.com/fadfafsdfeef and you should see the custom smart 404 page.

Smart 404 for WordPress Installation

1. Simple upload smart404-wordpress.php to your themes folder and rename it 404.php replacing the current one.

Smart 404 with Custom Search Engine Installation:

1. First of you will need to add the following into your .htaccess file:

ErrorDocument 404 /search-engine/smart404.php
ErrorDocument 400 /search-engine/smart404.php
ErrorDocument 403 /search-engine/smart404.php
ErrorDocument 500 /search-engine/smart404.php

This is to tell your server to use the smart404.php page for the error pages above (please google to see what each is for, if you dont know). Also please change the file location as you need it.

2. Now we need to install the custom search engine which is quite simple and fast so dont worry, its practically all done for you!

We recommend installing in a subfolder to keep the script in one easy to manage place on your server, plus our custom smart 404 script has been coded for a folder called "search-engine".

2a. Unpack the files, and copy them to the server, for example to /home/youruser/public_html/search-engine (later referred to as [path]).

2b. Create a database in MySQL to hold you search engine data, and give it full access permissions. For more information on how to create a database and give/get the necessary permissions, check MySQL.com

2c. In the settings directory, edit the database.php file and change $database, $mysql_user, $mysql_password and $mysql_host to the correct values of the database you just created ($mysql_host should probably stay as 'localhost').

2d. Open /search-engine/admin/install.php in your browser, this will create the necessary tables in your database for the search engine to operate.

2e. Edit /search-engine/admin/auth.php to change the administrator user name and password (default values are 'admin' and 'admin').

2f. Open /search-engine/admin/admin.php in browser and start indexing.

2g. /search-engine/index.php is the default search page. But I recommend you add a redirect from www.yourdomain.com/search to www.yourdomain.com/search-engine/search.php

Please see <a href="http://www.nathanielbailey.co.uk/custom-search-engine.php">http://www.nathanielbailey.co.uk/custom-search-engine.php</a> or the install.txt file in the search engine folder for more information on the search engine settings etc.

Please feel free to contact me at <a href="http://www.nathanielbailey.co.uk/">http://www.nathanielbailey.co.uk</a> if you require any help or information!
Source: naths-smart404-readme.txt, updated 2011-06-20