Forum Moderators: open
I've recently discovered the rather nice convenience of Server Side Includes. Here's my dilemma. I would like to start incorporating the Server Side Includes into some of my existing pages. Problem is, of course, is that these pages are .htm pages, not .shtm pages.
Hence, in order to to this, the pages will need to be changed from .htm to .shtm pages. This is going to lead to problems. The first problem is that all the links in my site that point to these pages will need to be changed to point to the .shtm - and there is a ton of pages that do. May take weeks to first find them and then change them all.
The second, and biggest problem, is that these pages get quite a bit of traffic from the SE's. If i change the pages to .shtm to .htm, anyone visiting these pages is going to get a 404 error from the SE's.
So, what I need to do is to somehow automatically redirect requests to these .htm pages to redirect to the .shtm "behind the scenes" automatically, with a message left on the .htm pages to visit the new page in case the redirection doesn't work for some reason.
Problem is, I have absolutely no idea what to do to automatically redirect requests to these .shtm pages from my existing .htm pages. Any redirection also needs to be SE friendly. I'll remove the content from the .htm pages to avoid any duplicate content penalties, but still, I've heard redirects can cause nasty problems with the SE's if not done correctly.
Thus, my question is, seeing what I have to do - does anyone have any ideas on how to do it? All in all, about 50 pages need to be changed from .htm to .shtm.
Thanks.
Jim
The answer depends on your server, but your problem is easy to solve. There is also no need to worry about "if the redirection doesn't work" if you use server redirects, as opposed to on-page-coded JS or meta-refresh redirects.
Do a WebmasterWorld site search for "redirect" plus your server name - IIS or Apache, for example.
On Apache, it's at most a few lines of code in httpd.conf or .htaccess.
Also on Apache, you do not necessarily have to change the file type - you can use AddHandler or the XBitHack to enable SSI parsing of non-shtml pages. These are documented on the Apache web site, httpd.apache.org.
HTH,
Jim