Quote:
Originally Posted by Learnin' n00b
I could do that. I had no idea that having many lines in the .htaccess file was a bad thing
However, doing as you suggest might mean not having a sitemap as my 404 page. Would this hurt my site's seo?
|
Your 404 page, if written in php, for instance, can be written to include some form of logic that consists of an "if - then - else." Something on the order of:
IF
a CapitalizedFilename is sent to 404 because it doesn't exist, THEN
I have a routine here to make it all lowercase and forward it on."
ELSE
Generate the HTML containing the standard output of your 404 page, which can contain a link to your sitemap or can be a sitemap.
END IF
Now, I am recalling syntax from BASIC in this example, as I used a lot of that on my Radio Shack Color Computer 2, 30 years ago. But PHP and Perl, even Bash, have their own syntax for accomplishing this same thing.
And if a CapitalLink is 404'd it runs through the routine and gets sent out in lowercase, and then, if that doesn't exist, it will be 404'd again. This time the 404 Not Found page/sitemap is displayed on the visitor's screen.
There is a http://tycoontalk.freelancer.com/web...4-rewrite.html rewrite thread that may be of interest to you in designing logic into a 404 page.
Last edited by L a r r y; 07-24-2011 at 09:04 PM..
Reason: typo
|