Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Old August 5th, 2007, 01:47 PM
Glen_S Glen_S is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Lac La Biche, Alberta, Canada
Posts: 10 Glen_S User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 35 m 7 sec
Reputation Power: 0
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?

Reply With Quote
Old September 10th, 2007, 06:10 AM
rbrown rbrown is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 139 rbrown User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 12 h 8 m 5 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Apache - Need to modify .htaccess for php in html files or look for index.php


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap