ASP Site Design Question

ASP Site Design Question

am 17.03.2005 17:31:07 von McKirahan

When developing a new site, I often use the following :







"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.)

Re: ASP Site Design Question

am 17.03.2005 17:43:54 von unknown

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" wrote in message
news:BqednTvPTsVbLaTfRVn-uw@comcast.com...
> When developing a new site, I often use the following :
>
>
>
>
>
>
>
> "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.)
>
>

Re: ASP Site Design Question

am 18.03.2005 12:07:40 von McKirahan

Please do not top post:)

"Curt_C [MVP]" 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" wrote in message
> news:BqednTvPTsVbLaTfRVn-uw@comcast.com...
> > When developing a new site, I often use the following :
> >
> >
> >
> >
> >
> >
> >
> > "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 %>

<% End If %>

even though the tag is in the body of the page (inside of a table).

The 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.

Re: ASP Site Design Question

am 18.03.2005 14:42:59 von Bob Lehmann

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

"McKirahan" wrote in message
news:f92dnV8zs_nlK6ffRVn-jA@comcast.com...
> Please do not top post:)
>
> "Curt_C [MVP]" 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" wrote in message
> > news:BqednTvPTsVbLaTfRVn-uw@comcast.com...
> > > When developing a new site, I often use the following :
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > "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 %>
>
> <% End If %>
>
> even though the tag is in the body of the page (inside of a table).
>
> The 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.
>
>

Re: ASP Site Design Question

am 18.03.2005 16:10:10 von McKirahan

"Bob Lehmann" wrote in message
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

[snip]

"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/

Re: ASP Site Design Question

am 18.03.2005 16:41:54 von ten.xoc

> "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.

Re: ASP Site Design Question

am 18.03.2005 17:08:05 von unknown

Amen brotha.....amen.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Aaron [SQL Server MVP]" 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.
>
>

Re: ASP Site Design Question

am 18.03.2005 18:38:24 von Brian Staff

>> 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