At 5:05 PM +0300 8/24/08, Dotan Cohen wrote:
On one particular server, all *.html files are written in Python. I
uploading a few PHP files to the directory, but they must also have
.html extensions (they are replacing files that _were_ python, but it
is rather important that the filename stay the same and I'd rather
avoid rewrite). I figured that it would be easy enough to add a
separate line in .htaccess for each PHP file, but I'm not getting it
for some reason. This is the .htaccess line that lets the system parse
*.html files as Python:
AddHandler cgi-script .html

This is what I'm trying to add to have the system parse specific files as PHP:
AddType application/x-httpd-php filename.html

I know that I am doing something wrong, but I do not know what. Any
ideas? Thanks!

--
Dotan Cohen

Dotan:

This is what I use to force php to consider certain files:

# handler for phpsuexec..
<FilesMatch "\.(htm|html|css|tpl)$">
 SetHandler application/x-httpd-php
</FilesMatch>

I occasionally use php in css files and this works for that.

My understanding is that you could change the FilesMatch to whatever specific files you want. For example, if you had changed "contact.html" from Python to php it would read:

<FilesMatch "contact.html">

Would that solve the problem?

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to