M
McKirahan
When developing a new site, I often use the following :
<!-- This is page: WEB_Page.asp -->
<!--#include file="WEB_0.asp"-->
<!--#include file="WEB_1.asp"-->
<!--#include file="WEB_Page.htm"-->
<!--#include file="WEB_2.asp"-->
"WEB" varies and is an acronym for a client's or site's name.
"WEB_Page.asp" is the file above.
"WEB_0.asp" contains shared ASP variables, subs, etc.
"WEB_1.asp" contains shared page header HTML.
"WEB_Page.htm" contains HTML for this page.
"WEB_2.asp" contains shared page footer HTML.
"WEB_1.asp" includes "WEB_1.css" which contains shared CSS.
Other page names replace "_Page" with their own name.
E.g., "Conact Us" pages = "WEB_Cont.asp" and "WEB_Cont.htm".
(I use 8.3 naming as I have some utilities that manage my source.)
I see the advantage to this is that I've isolated the content
of each page into a file (e.g. "WEB_Page.htm") and can easily
change the look-and-feel by changing two other files:
"WEB_1.asp" and "WEB_2.asp" (and maybe "WEB_1.css").
Another advantage is that by using the ".htm" extension,
I can preview a page's content (albeit without formatting)
by double-clicking on it's filename in Windows Explorer.
My problem is that if the site already exists and I want to upgrade
it to this approach (and I don't change page names) then the
search engines will have already indexed the ".htm" files.
Thus, visitors would see the "raw" content.
Other than renaming my content with an ".html" extension, how
can I automatically redirect visitors to the ".asp" page when they
visit the corresponding ".htm" page?
Thanks in advance for any suggestions.
One thought I had while composing this post:
I could associate a different extension in Windows Explorer
so that a double-click will still open them in Internet Explorer.
(And, of course, add a custom 404 page to redirect visitors.)
<!-- This is page: WEB_Page.asp -->
<!--#include file="WEB_0.asp"-->
<!--#include file="WEB_1.asp"-->
<!--#include file="WEB_Page.htm"-->
<!--#include file="WEB_2.asp"-->
"WEB" varies and is an acronym for a client's or site's name.
"WEB_Page.asp" is the file above.
"WEB_0.asp" contains shared ASP variables, subs, etc.
"WEB_1.asp" contains shared page header HTML.
"WEB_Page.htm" contains HTML for this page.
"WEB_2.asp" contains shared page footer HTML.
"WEB_1.asp" includes "WEB_1.css" which contains shared CSS.
Other page names replace "_Page" with their own name.
E.g., "Conact Us" pages = "WEB_Cont.asp" and "WEB_Cont.htm".
(I use 8.3 naming as I have some utilities that manage my source.)
I see the advantage to this is that I've isolated the content
of each page into a file (e.g. "WEB_Page.htm") and can easily
change the look-and-feel by changing two other files:
"WEB_1.asp" and "WEB_2.asp" (and maybe "WEB_1.css").
Another advantage is that by using the ".htm" extension,
I can preview a page's content (albeit without formatting)
by double-clicking on it's filename in Windows Explorer.
My problem is that if the site already exists and I want to upgrade
it to this approach (and I don't change page names) then the
search engines will have already indexed the ".htm" files.
Thus, visitors would see the "raw" content.
Other than renaming my content with an ".html" extension, how
can I automatically redirect visitors to the ".asp" page when they
visit the corresponding ".htm" page?
Thanks in advance for any suggestions.
One thought I had while composing this post:
I could associate a different extension in Windows Explorer
so that a double-click will still open them in Internet Explorer.
(And, of course, add a custom 404 page to redirect visitors.)