473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

mapping .php on .html

Hello I need apache to process .html file as if they were .php files.
I cannot modify httpd.conf, so I've added a .htaccess file in the same
directory where the html files reside.
The .htaccess file contains this directive:

AddType application/x-httpd-php .html

When I load the html page, the browser pop-up a window asking to open or
download the file, instead of opening the page.
How can I fix it?

Thank you

--
elimina unsampdoriano per rispondere via email
Jul 17 '05 #1
2 1523
Generale Cluster wrote:

Hello I need apache to process .html file as if they were .php files.
I cannot modify httpd.conf, so I've added a .htaccess file in the same
directory where the html files reside.
The .htaccess file contains this directive:

AddType application/x-httpd-php .html

When I load the html page, the browser pop-up a window asking to open or
download the file, instead of opening the page.
How can I fix it?


Methinks you want to change AddType to AddHandler. Otherwise, you're changing
the Mime type.

Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #2
"Shawn Wilson" <sh***@glassgiant.com> ha scritto nel messaggio
news:41***************@glassgiant.com
Generale Cluster wrote:

Hello I need apache to process .html file as if they were .php
files. I cannot modify httpd.conf, so I've added a .htaccess file in
the same directory where the html files reside.
The .htaccess file contains this directive:

AddType application/x-httpd-php .html

When I load the html page, the browser pop-up a window asking to
open or download the file, instead of opening the page.
How can I fix it?


Methinks you want to change AddType to AddHandler. Otherwise, you're
changing the Mime type.

Shawn


Good, it works. Thanks
--
elimina unsampdoriano per rispondere via email





Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Pierre Fortin | last post by:
Hi! "Python Essential Reference" - 2nd Ed, on P. 47 states that a string format can include "*" for a field width (no restrictions noted); yet... >>> "%*d" % (6,2) # works as expected ' ...
9
by: Jerry Sievers | last post by:
Fellow Pythonists; I am totally puzzled on the use of slicing on mapping types and especially unsure on use of the Ellipsis... and slicing syntax that has two or more groups seperated by comma....
2
by: object-relational persistence mapping | last post by:
Someone can tell me where I find a good Object-Relational Mapping library.
6
by: naruto | last post by:
Hi all, I have the following being defined in a A.cxx file. // define in source file. Not exported to the outside world (this cannot be // moved to the header file ) #define CHANNEL_0 0...
10
by: mike | last post by:
regards: Where to find tag mapping-table of HTML translated to XHTML1.0 Any positive suggestion is welcome. thank you May goodness be with you all
1
by: Tamas Hegedus | last post by:
Hi! I am looking for an xml-object mapping tool ('XML Data Binding-design time product') where I can define the mapping rules in 'binding files' and the parser is generated automatically. ...
4
by: Ian Turner | last post by:
Hi, In an attempt to get every request for a particular virtual directory to go through ASP.NET I've been trying to add a wildcard application mapping. The scenario is that any url for that VD,...
0
by: Thomas | last post by:
in .net 1.1 we successfully use a HttpModule to catch 404 / 403.1 html errors. after migrating to .net 2.0, this modules is broken in a very, very strange way. we have defined a wildcard...
3
by: anthriksh2000 | last post by:
Hi, I want to have a image which has 4 people in it and i wnat that it should have image mapping. and when a particulat person is clicked upon in that image it should open a corresponding person...
3
by: vijaykumardahiya | last post by:
Dear Sir, I have two queries. First question is: I have a Html page. On which Have two buttons Submit and Issue. I want when I click on Sumit button request should be go to submit.jsp. and When I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.