Forum Moderators: phranque

Message Too Old, No Replies

Mod Rewrite for .php to .html

How to convert .php to .html

         

sapparod

8:27 am on Aug 3, 2005 (gmt 0)

10+ Year Member



Hello, I try to find information about how to convert .php to .html. I use time about 12 hours but not success. I found some sit that tell me as follow;

rewriteEngine ON
rewriteRule ^([^.]+)\.html$ /$1.php [L]

I try many time but can't . some one please help me.
This is my file wwWebmasterWorldebsite.com/product.php convert to wwWebmasterWorldebsite.com/product.html

How can i do first and next steps.
Thanks

bruciemoose

5:01 pm on Aug 3, 2005 (gmt 0)



May I ask why you want to do this? If it's for SEO, take a look at: [google.com...]

garyr_h

7:04 pm on Aug 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't say I know the answer to this, but people do it in order to hide what language the file was written in.

jd01

2:36 am on Aug 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code you have will server the php information to the html pages as long as the full URL's to both are the same. You will need to have the on your site all pointing to the .html version of the page and the php file 'mirrors' in the same directory.

I serve all my php pages this way with some added security measures - you cannot request the php files or you get an error.

Hope this helps.

Justin