PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > apache2 processing php files with html extensions
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

apache2 processing php files with html extensions

Réponse
 
LinkBack Outils de la discussion
Vieux 16/02/2005, 02h29   #1
dave
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut apache2 processing php files with html extensions

Hello,
Apache2 on Unix, with php support compiled in as a dso. Currently to get
support on a page the page has to be renamed with a .php extension. I don't
want to do this, i'd have to rename several dozen pages plus change all the
links within a page. How would i make apache2 handle php processing for all
pages that have either .php, .htm, or .html extensions?
Thanks.
Dave.


  Réponse avec citation
Vieux 16/02/2005, 12h09   #2
sharma
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: apache2 processing php files with html extensions

Add .html to this php directive in php.ini

1)search for this in php.ini
AddType application/x-httpd-php

2) .html at the end of the line like this

AddType application/x-httpd-php .php .html

if you want htm page to run add .htm ..
AddType application/x-httpd-php .php .html .htm

3)restart Apache...

If you are not having access to php.ini.. put it line 2 in .htacess
file and place it in your webroot...

Hope this s..

Thanks,
sharma

  Réponse avec citation
Vieux 16/02/2005, 13h06   #3
sharma
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: apache2 processing php files with html extensions

Hey sorry,

Its not in php.ini...

Its in Apache's configration file, httpd.conf, you need an AddType
directive that matches scripst ending in .php with
application/x-httpd-php.


1)search for this in php.ini
AddType application/x-httpd-php

2) .html at the end of the line like this

AddType application/x-httpd-php .php .html

if you want htm page to run add .htm ..
AddType application/x-httpd-php .php .html .htm

3)restart Apache...

If you are not having access to php.ini.. put it line 2 in .htacess
file and place it in your webroot...

Hope this s..

Thanks,
sharma

  Réponse avec citation
Vieux 16/02/2005, 20h01   #4
dave
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: apache2 processing php files with html extensions

Hello,
Thanks a lot that did it.
Dave.


  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 22h43.


Édité par : vBulletin® version 3.7.3
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 ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09172 seconds with 12 queries