In order to change the 404 page not found displayed to external web browsers on a SME 6.01 box this is what I did:
1. Made a directory for the template fragment:
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
2. Created a template fragment in the above directory.
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
pico 11ErrorDocs
3. I added these lines to the 11ErrorDocs file with pico or whatever text editor you like:
ErrorDocument 500 /filenotfound.html
ErrorDocument 404 /filenotfound.html
ErrorDocument 401 /filenotfound.html
ErrorDocument 403 /filenotfound.html
ErrorDocument 402 /filenotfound.html
Save and close. You can do just one of those errors or any combination you like. You can name the html file whatever you like, or use php files if you prefer. You can also specify a different filename for each error type. Just make sure the filename(s) are used in the next step. You can also place them in a sub-directory, just make sure you use an absolute path to whatever file you are using in the 11ErrorDocs template fragment.
4. Created my custom 404 page and named it filenotfound.html and placed it in:
/home/e-smith/files/ibays/Primary/html
5. Expanded the template
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
6. Restarted the http server
/etc/rc.d/init.d/httpd graceful
See this thread:
http://forums.contribs.org/index.php?topic=17159.0I also understand you can use Nightspirit's .htaccess contrib found here for the same effect:
http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-htaccess/Just install the rpm, then create your .htaccess file in /home/e-smith/files/ibays/Primary/html/ with the same lines as in the 11ErrorDocs template fragment in step 3.
If you place the .htaccess someplace other than the ibay root it will only serve the custom error page for files not found in that sub-directory. If it's in the root I believe it works for all errors referenced in .htaccess in that ibay (or other error types listed in your .htaccess). I did not extensively test that point, so you result may vary

Create your custom error pages as above in step 4. Skip step 5 as no template changes are needed.
Do chmod -644 .htaccess from the Primary ibay root. Then restart apache as in step 7. I tried this and it worked as well. I went with the template method based on Charlie Brady's input in that thread I cited above.
Happy Customizing!
Don't you love it when all the pieces come together?
