Afficher un message
Vieux 28/04/2008, 13h17   #4
C. (http://symcbean.blogspot.com/)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Using Apache's mod_rewrite to hide scripts extension

On 28 Apr, 11:54, "Álvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.com> wrote:
> Jerry Stuckle escribió:
>
> > As for your question - it is NOT a good idea to parse all .html files as
> > .php, anyway. It puts an unnecessary load on the server. Just keep php
> > code in .php files. You'll find it works much better.

>
> There aren't any plain HTML files in the site: they all use PHP to
> compose the page including headers, footers and the like (plus headers
> for client-side caching: site contents are not actually dynamic).
> Currently, I code in *.html files and get them all parsed as PHP but
> it's annoying because I have to tell my text editor to use PHP syntax
> highlighting for *.html files... but only for that project! Furthermore,
> if I ever add a plain HTML file I can't distinguish it easily.
>
> I thought mod_rewrite could be an elegant solution but I'm disappointed
> with my lack of understanding of its internals.
>
> If I completely omit extensions (http://example.com/foo/bar) the issue
> is the same: I can't preventhttp://example.com/foo/bar.phpfrom loading.
>
> --
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://bits.demogracia.com
> -- Mi web de humor al baño María:http://www.demogracia.com
> --


Wouldn't it be simpler to just rename all your files as .html and
setup the PHP handler to process them?

C.
  Réponse avec citation
 
Page generated in 0,05682 seconds with 9 queries