|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Apache - Need to modify .htaccess for php in html files or look for index.php
I've installed apache and php on my laptop for testing web pages since I started using php includes for menu's etc. to make sure the pages work. On one site I just modified the .htaccess file so it looked like this:
# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html Addhandler application/x-httpd-php .html .php This let me run php includes on .html pages, but I am building another site and I can't get the php code to work in the index.html page. It works fine if I give the pages a .php extension so I thought I'd just put in a line in that had DirectoryIndex index.php in it and rename the page index.php but that didnt work either. Here is my .htaccess file: # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> DirectoryIndex index.php RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html Addhandler application/x-httpd-php .html .php Am I missing something here? |
|
#2
|
|||
|
|||
|
try just having this only:
AddType application/x-httpd-php .html or try this: Options +FollowSymLinks RewriteEngine on AddType application/x-httpd-php .html That works for me on unix and windows / apache boxes
__________________
Bob |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Server Administration > Apache - Need to modify .htaccess for php in html files or look for index.php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|