Forum Moderators: coopster

Message Too Old, No Replies

Please help me with this code

         

n22php

6:54 am on Mar 7, 2006 (gmt 0)



I want to parse php in .html files.

I put this in .htacces file:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

Its work, but some of my php aplications have urls:

www.mysite.com/this-is-page

without .html in the end

how to parse that? Which code I must use.

Please help me. I think that for the apache guru this is not a problem to do. Sorry if my english bad.

omoutop

12:36 pm on Mar 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



try somehting like this in your htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteOptions inherit
RewriteBase /

RewriteRule ^/path/to/new_page.html$ path/to/old_page [NC,L]

dont know if it will work 100% - have a look at mod_rewrite for further info and insight