PDA

View Full Version : Html & Shtml


Damian
05-11-2001, 05:03 PM
Alrighty,
I recently migrated a lot of my pages from .html to .shtml -- but since I didn't set an expiry date on my metadata --when you query a search engine, invariably you'll pull up a page that doesn't exist.

Is there some code that I can use that will see a request for an html page and redirect it to an shtml page? As long as they have the same name of course :)

WackyMan

RevKev
05-11-2001, 05:06 PM
In my complete ignorance, I would probably start by creating all the same pages with .html endings again, but placing nothing on them except a redirect to the proper .shtml page. Shouldn't take up very much space. (depends on how many pages, I guess...)... Of course, there is probably a much cleaner way of doing this with .htaccess or something. :)

Damian
05-11-2001, 05:10 PM
That's a good idea -- but there HAS to be a better way of doing it...and in my ignorance I don't know how :)

prymal
05-11-2001, 05:57 PM
basically, what you could have done to avoid any trouble, is add the following line in your .htaccess file:

AddHandler server-parsed .html

this way, you wouldn't have to rename any files and your .html files would behave like .shtml files.

something to think about for the future maybe. :)

Damian
05-11-2001, 06:00 PM
Awesome! Thanks for the tip.