|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP Site Design Question
<!-- 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.) delete the .htm and put in some custom handling in the 404 page, to redirect
from *.htm to *.asp, maybe keep a list of valid ones to prevent infinite looping, etc. Or just replace all the code in the .htm files with javascript redirectors Show quote "McKirahan" <N***@McKirahan.com> wrote in message news:BqednTvPTsVbLaTfRVn-uw@comcast.com... > 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.) > > Please do not top post:)
Show quote "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message Thanks for your reply.news:OaBF1AxKFHA.1172@TK2MSFTNGP12.phx.gbl... > delete the .htm and put in some custom handling in the 404 page, to redirect > from *.htm to *.asp, maybe keep a list of valid ones to prevent infinite > looping, etc. > Or just replace all the code in the .htm files with javascript redirectors > > -- > Curt Christianson > Site & Scripts: http://www.Darkfalz.com > Blog: http://blog.Darkfalz.com > > > "McKirahan" <N***@McKirahan.com> wrote in message > news:BqednTvPTsVbLaTfRVn-uw@comcast.com... > > 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.) Placing the following at the top of "WEB_Page.htm" seems to work: <% If 0 = 1 Then %> <meta http-equiv="refresh" content="0; URL=http://www.domain.com/WEB_Page.asp"> <% End If %> even though the <meta> tag is in the body of the page (inside of a table). The <meta> tag executes when the ".htm" page is invoked but is ignored if the ".asp" page (which "includes" the ".htm" file) is invoked. Any thoughts (from anyone)? Thanks. Please do not bottom post:)
>Any thoughts (from anyone)? Thanks. Yes. When someone helps you with your problem, don't try to enforce yourmisplaced ettiquette with them. Topposting is common in these groups. Bob Lehmann Show quote "McKirahan" <N***@McKirahan.com> wrote in message news:f92dnV8zs_nlK6ffRVn-jA@comcast.com... > Please do not top post:) > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message > news:OaBF1AxKFHA.1172@TK2MSFTNGP12.phx.gbl... > > delete the .htm and put in some custom handling in the 404 page, to > redirect > > from *.htm to *.asp, maybe keep a list of valid ones to prevent infinite > > looping, etc. > > Or just replace all the code in the .htm files with javascript redirectors > > > > -- > > Curt Christianson > > Site & Scripts: http://www.Darkfalz.com > > Blog: http://blog.Darkfalz.com > > > > > > "McKirahan" <N***@McKirahan.com> wrote in message > > news:BqednTvPTsVbLaTfRVn-uw@comcast.com... > > > 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.) > > Thanks for your reply. > > Placing the following at the top of "WEB_Page.htm" seems to work: > > <% If 0 = 1 Then %> > <meta http-equiv="refresh" content="0; > URL=http://www.domain.com/WEB_Page.asp"> > <% End If %> > > even though the <meta> tag is in the body of the page (inside of a table). > > The <meta> tag executes when the ".htm" page is invoked but is ignored if > the ".asp" page (which "includes" the ".htm" file) is invoked. > > Any thoughts (from anyone)? Thanks. > > "Bob Lehmann" <nospam@dontbotherme.zzz> wrote in message [snip]news:e9vxl#7KFHA.4092@tk2msftngp13.phx.gbl... > Please do not bottom post:) > > >Any thoughts (from anyone)? Thanks. > Yes. When someone helps you with your problem, don't try to enforce your > misplaced ettiquette with them. Topposting is common in these groups. > > Bob Lehmann "When replying to a message on the group trim quotes of the preceding messages to the minimum needed and add your comments below the pertinent section of quoted material, as per FYI28/RFC1855 (never top post)." -- http://www.jibbering.com/faq/ > "When replying to a message on the group trim quotes of the Oh Christ, not this again.> preceding messages to the minimum needed and add your comments > below the pertinent section of quoted material, as per > FYI28/RFC1855 (never top post)." > > -- http://www.jibbering.com/faq/ I use both styles depending on the situation, and I'll stop using NNTP entirely before I'll be told how I should help people based on some stupid global dictation on some web site. Amen brotha.....amen.
Show quote "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:ONk0OE9KFHA.3832@TK2MSFTNGP12.phx.gbl... >> "When replying to a message on the group trim quotes of the >> preceding messages to the minimum needed and add your comments >> below the pertinent section of quoted material, as per >> FYI28/RFC1855 (never top post)." >> >> -- http://www.jibbering.com/faq/ > > Oh Christ, not this again. > > I use both styles depending on the situation, and I'll stop using NNTP > entirely before I'll be told how I should help people based on some stupid > global dictation on some web site. > > >> When replying to a message on the group trim quotes of the preceding messages to the minimum needed and add your comments below the pertinent section of quoted material, as per FYI28/RFC1855 (never top post). Many times the quotes are not trimmed and there's nothing more annoying than seeing a whole page of quotes from a preceeding posting and then a reply at the bottom which I am forced to scroll down to see. I tend to ignore such postings. Brian |
|||||||||||||||||||||||