PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > .htaccess route to php on .html
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
.htaccess route to php on .html

Réponse
 
LinkBack Outils de la discussion
Vieux 05/09/2007, 01h39   #1
dorayme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut .htaccess route to php on .html

I made an .htaccess file to allow my .html files to be parsed for
any php on them. It has:

AddType application/x-httpd-php .html

It did not work on one server (a university server that is Apache
and Unix and all that good old stuff, nothing Windows or funny
stuff). Before I contact server admin, any other ways to
accomplish getting a .html file to be so parsed? If I name my
files .php on this particular server, all work fine. I can put
the .htaccess file simply at the top level of my website or one
level above (where I see no *other* files, no permission
probably). I have no real idea about this stuff, but I love it
when it works. <g>

--
dorayme
  Réponse avec citation
Vieux 05/09/2007, 01h51   #2
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

dorayme wrote:
> I made an .htaccess file to allow my .html files to be parsed for
> any php on them. It has:
>
> AddType application/x-httpd-php .html
>
> It did not work on one server (a university server that is Apache
> and Unix and all that good old stuff, nothing Windows or funny
> stuff). Before I contact server admin, any other ways to
> accomplish getting a .html file to be so parsed? If I name my
> files .php on this particular server, all work fine. I can put
> the .htaccess file simply at the top level of my website or one
> level above (where I see no *other* files, no permission
> probably). I have no real idea about this stuff, but I love it
> when it works. <g>
>


Multiviews would work, also.

But it's a very bad idea to parse all files as PHP files. It puts an
unnecessary load on the server for those files which do not contain PHP
code.

If they contain PHP code, they should have a .php extension. Problem
solved.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 05/09/2007, 01h51   #3
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

dorayme wrote:
> I made an .htaccess file to allow my .html files to be parsed for
> any php on them. It has:
>
> AddType application/x-httpd-php .html
>
> It did not work on one server (a university server that is Apache
> and Unix and all that good old stuff, nothing Windows or funny
> stuff). Before I contact server admin, any other ways to
> accomplish getting a .html file to be so parsed? If I name my
> files .php on this particular server, all work fine. I can put
> the .htaccess file simply at the top level of my website or one
> level above (where I see no *other* files, no permission
> probably). I have no real idea about this stuff, but I love it
> when it works. <g>
>


And BTW - you should be asking this in alt.apache.configuration. It's
not really a PHP question.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 05/09/2007, 02h09   #4
dorayme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

In article <C7CdnWxAs7hhYEDbnZ2dnUVZ_hzinZ2d@comcast.com>,
Jerry Stuckle <jstucklex@attglobal.net> wrote:

> dorayme wrote:
> > I made an .htaccess file to allow my .html files to be parsed for
> > any php on them. It has:
> >
> > AddType application/x-httpd-php .html
> >
> > It did not work on one server (a university server that is Apache
> > and Unix and all that good old stuff, nothing Windows or funny
> > stuff). Before I contact server admin, any other ways to
> > accomplish getting a .html file to be so parsed? If I name my
> > files .php on this particular server, all work fine. I can put
> > the .htaccess file simply at the top level of my website or one
> > level above (where I see no *other* files, no permission
> > probably). I have no real idea about this stuff, but I love it
> > when it works. <g>
> >

>
> And BTW - you should be asking this in alt.apache.configuration. It's
> not really a PHP question.


Actually, thanks for this one. I will try there.

--
dorayme
  Réponse avec citation
Vieux 05/09/2007, 02h16   #5
dorayme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

In article <C7CdnW1As7hKYEDbnZ2dnUVZ_hzinZ2d@comcast.com>,
Jerry Stuckle <jstucklex@attglobal.net> wrote:

> dorayme wrote:
> > I made an .htaccess file to allow my .html files to be parsed for
> > any php on them. It has:
> >
> > AddType application/x-httpd-php .html
> >
> > It did not work on one server (a university server that is Apache
> > and Unix and all that good old stuff, nothing Windows or funny
> > stuff). Before I contact server admin, any other ways to
> > accomplish getting a .html file to be so parsed? If I name my
> > files .php on this particular server, all work fine. I can put
> > the .htaccess file simply at the top level of my website or one
> > level above (where I see no *other* files, no permission
> > probably). I have no real idea about this stuff, but I love it
> > when it works. <g>
> >

>
> Multiviews would work, also.


?

--
dorayme
  Réponse avec citation
Vieux 05/09/2007, 02h23   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

dorayme wrote:
> In article <C7CdnW1As7hKYEDbnZ2dnUVZ_hzinZ2d@comcast.com>,
> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>
>> dorayme wrote:
>>> I made an .htaccess file to allow my .html files to be parsed for
>>> any php on them. It has:
>>>
>>> AddType application/x-httpd-php .html
>>>
>>> It did not work on one server (a university server that is Apache
>>> and Unix and all that good old stuff, nothing Windows or funny
>>> stuff). Before I contact server admin, any other ways to
>>> accomplish getting a .html file to be so parsed? If I name my
>>> files .php on this particular server, all work fine. I can put
>>> the .htaccess file simply at the top level of my website or one
>>> level above (where I see no *other* files, no permission
>>> probably). I have no real idea about this stuff, but I love it
>>> when it works. <g>
>>>

>> Multiviews would work, also.

>
> ?
>


Check alt.apache.configuration (assuming, of course, you use Apache).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
  Réponse avec citation
Vieux 05/09/2007, 17h27   #7
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

dorayme wrote:
> I made an .htaccess file to allow my .html files to be parsed for
> any php on them. It has:
>
> AddType application/x-httpd-php .html
>
> It did not work on one server (a university server that is Apache
> and Unix and all that good old stuff, nothing Windows or funny
> stuff). Before I contact server admin, any other ways to
> accomplish getting a .html file to be so parsed? If I name my
> files .php on this particular server, all work fine. I can put
> the .htaccess file simply at the top level of my website or one
> level above (where I see no *other* files, no permission
> probably). I have no real idea about this stuff, but I love it
> when it works. <g>
>


If the admin has configured the apache to not allow users to use .htaccess,
then there aren't anything you can do about it than ask the admins.

IMHO it's a really bad thing to let php parse all html files, as this increase
the load on the server.

--

//Aho
  Réponse avec citation
Vieux 06/09/2007, 02h42   #8
dorayme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: .htaccess route to php on .html

In article <5k83o4F2ig8bU2@mid.individual.net>,
"J.O. Aho" <user@example.net> wrote:

> dorayme wrote:
> > I made an .htaccess file to allow my .html files to be parsed for
> > any php on them. It has:
> >
> > AddType application/x-httpd-php .html
> >
> > It did not work on one server (a university server that is Apache
> > and Unix and all that good old stuff, nothing Windows or funny
> > stuff). Before I contact server admin, any other ways to
> > accomplish getting a .html file to be so parsed? If I name my
> > files .php on this particular server, all work fine. I can put
> > the .htaccess file simply at the top level of my website or one
> > level above (where I see no *other* files, no permission
> > probably). I have no real idea about this stuff, but I love it
> > when it works. <g>
> >

>
> If the admin has configured the apache to not allow users to use .htaccess,
> then there aren't anything you can do about it than ask the admins.
>
> IMHO it's a really bad thing to let php parse all html files, as this increase
> the load on the server.


Thanks, I better ask them. I have had a radical new thought: for
this particular job, I might just change the files to .php and be
done. All work fine then.

(As for server load, all this came up before once and it seems
not a straightforward matter. I have a site that works well and
quick that parses the html for php, nearly all files having some
php on it).

--
dorayme
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h29.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13552 seconds with 16 queries