Re: Https Redirects with IIS?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 08/07/04


Date: Sat, 7 Aug 2004 00:08:34 -0700

You can map .htm to ASP.DLL (just like .asp is mapped to ASP.DLL).

>From IIS's perspective, the only reason .ASP is processed as a script and
.HTM is processed as a static file is because of the .ASP ScriptMap. So,
you can scriptmap .HTM to ASP.DLL, and then IIS will also process .HTM as an
"ASP script".

The only thing you lose here is that .htm files get treated as "script"
(i.e. processed by ASP.DLL) and not "static file" (i.e. processed directly
by IIS). There is a ~10x performance/scalability hit with this change, but
you may be able to get away with it if performance is still sufficient.

-- 
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Ryan" <google.20.nikespex@neverbox.com> wrote in message
news:b4bbc7f2.0408041043.2a796d97@posting.google.com...
Paul Lynch <paul.lynch@nospam.com> wrote in message
news:<46q1h0di7p9m4b8772c2bn56iv4qs51ni3@4ax.com>...
> On 4 Aug 2004 06:34:31 -0700, google.20.nikespex@neverbox.com (Ryan)
> wrote:
>
> >I am currently managing a large web site of static (.htm) pages that
> >reside on an IIS 5 server.  Random files within this site should
> >always be browsed via https. It is not possible to gather these files
> >into a common directory, nor is it feasible to reference them via
> >fully qualified URLs(https://severname/directory/filename.htm).
> >Ideally the server would switch back to standard http when not
> >browsing these specific files.
> >
> >I believe on Apache I would be able to accomplish this by using
> >mod_rewrite or a RewriteRule.  Does IIS offer similar functionality?
> >Suggestions for the best way to pull this off would be much
> >appreciated.
>
> Ryan,
>
> Try this :
>
> HOW TO: Use ASP to Force SSL for Specific Pages
> http://support.microsoft.com/?id=239875
>
>
> Regards,
>
> Paul Lynch
> MCSE
Thanks Paul.  Unfortunately I am using static (.htm) files and
converting them to ASP isn't an option.  If you know of a way to make
the server process the ASP include files without changing my file
extensions, I'm all ears!


Relevant Pages

  • Re: asp page from htm page
    ... If you have access to the script mappings you can map .htm to be processed ... > I do have a number of admin capabilities on the host server via the> control pannel. ... > I'm guessing from you're answer that on the IIS admin application you can> set IIS to recognize ASP code in an htm file...? ... >> Well, for one thing, the information you're looking for is probably in>> the IIS logs - however it IS possible to run ASP code in a file marked ...
    (microsoft.public.inetserver.asp.general)
  • Re: why do .asp files prompt for login but .htm files do not?
    ... Well, for .htm page, IIS just opens that file and sends it back -- so if the ... user credentials are all good, ... For .asp page, it could run code to do other things -- like talk to a DB to ... IIS 5.0 in a domain. ...
    (microsoft.public.inetserver.iis.security)
  • Re: My htm pages work but my asp pages dont
    ... Please also include any error message that you can find on the webpage ... Kristofer Gafvert - IIS MVP ... It uses htm and asp pages. ...
    (microsoft.public.inetserver.iis)
  • .ASP pages wont post.
    ... When I use a .htm page as the default document in IIS, ... doc to an .ASP page, the site just shows a blank white ... supporting .ASP??? ...
    (microsoft.public.win2000.advanced_server)
  • Re: IIS 6.0 - Cannot update static HTML pages
    ... Kit (Chapter 7 Web Server Scalability). ... You can get the IIS Res Kit from: ... The application creates static .htm pages ...
    (microsoft.public.inetserver.iis)