parsing php to .html

Oh, the strange things mod_rewrite does!

parsing php to .html

Postby redsey » Mon Sep 01, 2008 11:32 am

i have a site which i want to include a menu system and use php includes.

However, all the existing pages are .html.

Can a parse all php pages to .html?

What code do a put in .htaccess? and where. Currently i have

Code: Select all
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.html? [NC]
RewriteRule ^(([^/]*/)*)index\.html?$$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^hip-consultant\.co\.uk [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Redirect 301 /services.html
Posts: 4
Joined: Sun Aug 31, 2008 11:13 am

Postby richardk » Tue Sep 02, 2008 11:24 am

Try AddType
Code: Select all
AddType application/x-httpd-php .html
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 1 guest