This is a discussion on .htaccess route to php on .html within the Apache Web Server forums, part of the Web Server and Related Forums category; I made an .htaccess file to allow my .html files to be parsed for any php on them. It has: ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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> Please, I want my html files to be checked for php on them. I have no access to anything on the server except my own files. I suspect I have to contact server admin, they may be blocking such things. I might, reluctantly, have to use .php (which works a treat straight away with no need for anything beyond the php on the page) -- dorayme |
|
|||
|
On Sep 5, 2:16 am, dorayme <doraymeRidT...@optusnet.com.au> 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> > > Please, I want my html files to be checked for php on them. I > have no access to anything on the server except my own files. I > suspect I have to contact server admin, they may be blocking such > things. I might, reluctantly, have to use .php (which works a > treat straight away with no need for anything beyond the php on > the page) > > -- > dorayme you could carry on writing .php files but rewrite anything ending in .html to the corresponding php file you have so say you create three files howdeedoodee.php noidontee.php and whatamacallit.php then you write yuor webpages pointing to howdeedoodee.html noidontee.html and whatamacallit.html then use a rewrite - providing they are switched on #might need to turn it on #ReWriteEngine On ReWriteRule (.*)\.html?$ $1.php [L] that oughta do it. (works for .htm files as well as .html - not the html? in the rule) |
|
|||
|
In article
<1189031391.858824.289760@d55g2000hsg.googlegroups .com>, shimmyshack <matt.farey@gmail.com> wrote: > On Sep 5, 2:16 am, dorayme <doraymeRidT...@optusnet.com.au> 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> > > > > Please, I want my html files to be checked for php on them. I > > have no access to anything on the server except my own files. I > > suspect I have to contact server admin, they may be blocking such > > things. I might, reluctantly, have to use .php (which works a > > treat straight away with no need for anything beyond the php on > > the page) > > > > -- > > dorayme > > you could carry on writing .php files but rewrite anything ending > in .html to the corresponding php file you have > so say you create three files > howdeedoodee.php > noidontee.php > and > whatamacallit.php > > then you write yuor webpages pointing to > howdeedoodee.html > noidontee.html > and > whatamacallit.html > > then use a rewrite - providing they are switched on > #might need to turn it on > #ReWriteEngine On > ReWriteRule (.*)\.html?$ $1.php [L] > that oughta do it. (works for .htm files as well as .html - not the > html? in the rule) Interesting idea! But it feels a bit desperate <g>. My thoughts are turning to simple renaming everything but the index page with ..php endings... It sure looks like server admin are blocking my attempts to parse .html for php. -- dorayme |