On Wed, 2010-06-23 at 17:34 -0700, Tommy Pham wrote:

> > -----Original Message-----
> > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> > Sent: Wednesday, June 23, 2010 4:47 PM
> > To: Phillip Baker
> > Cc: PHP General List
> > Subject: Re: [PHP] IIS, PHP and HTML
> > 
> > On Wed, 2010-06-23 at 16:26 -0600, Phillip Baker wrote:
> > 
> > > Greetings All,
> > >
> > > I am at a new Gig.
> > > So this is the existing setup so changing it at least in the short
> > > term is not an option.
> > >
> > > We are in an IIS shop.
> > > We have a bunch of files that are html, and in need of php
> functionality.
> > > And that would be a BUNCH of files.
> > >
> > > I am interested in setting if I can set up IIS to use the php
> > > interpreter on HTML files.
> > > And then just start using the html files as php.
> > >
> > > There are just so many html files I would prefer to not do 301
> > > redirects, not header redirects and blot the server with empty files
> (nearly
> > empty).
> > > My preference is to use the existing files.
> > >
> > > Is there a way to make this happen?
> > > Are there any pitfalls in making this happen that I will need to be
> > > aware of?
> > >
> > > Blessed Be
> > >
> > > Phillip
> > 
> > 
> > Yes, you just configure IIS to treat the .html extension the same as it
> > does .php.
> > 
> > Several things to note though. You can't control this on a site-by-site
> basis as
> > far as I remember, so if you set this, it's for the whole server. Any
> plain html
> > pages will be delivered more slowly.
> > 
> 
> Correction, IIS7.5 (Win08r2) and IIS7 (Win08) can set it at per
> path/site/server depending on your needs.  Set it via 'handler mappings'
> accordingly.  I don't remember IIS 6 and older since it's been a couple of
> years I've dealt with IIS 6.
> 
> Regards,
> Tommy
> 
> > Second, PHP code isn't inserted into HTML, rather it's the other way
> around.
> > This distinction is important when you are outputting content other than
> > HTML from PHP code, or when you are using the header() function.
> > 
> > Although IIS wouldn't be my server of choice, I think the one thing you
> may
> > find lacking is Apaches .htaccess files. IIS can emulate most of the
> behaviour
> > of this with plugins though, but I believe they tend to cost.
> > 
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> > 
> 
> 
> 


Ah, that's good for Phillip then. I've not used IIS for over a year now,
and the version I used was very old (cheap company didn't see the need
to update anything, ever!)

Thanks,
Ash
http://www.ashleysheridan.co.uk


Reply via email to