Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

php to html



10:54 pm on Oct 5, 2004 (gmt 0)

Hope this is the right place!

I'm wanting to convert php based to html, is there a simple way to do this. Searched around, but it seems converting html to php seems fairly straight-forward but not the other way.

If not practical would using redirects on existing html pages to php model cause probs with se.

I really need to keep html in place because converting all links would be a major headache, and I do not want to lose existing serps unless of course I could convert new php site to html so as to keep url extensions and then inbound link stucture would remain the same.
Any advice appreciated


11:18 pm on Oct 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Are you saying that you already have an html site, want to put up a php site, but don't want the users/engines to know that anything's changed? If so, then I assume you want the php site to still be php, but just *look* like an html site.

If you are running on a virtual or dedicated server, you can probably change the Apache configuration to treat .html files as .php files.

But the best way would be to use 301 redirects to send requests for the .html pages to their .php counterparts. This can cause a drop in referrals while the search engines are catching on, but if you leave the redirects in place forever, all should be well in the long run.


11:41 pm on Oct 5, 2004 (gmt 0)

Thank you mc,
yes basically - the site is html, I now need php.
What concerned me was issues regards redirects, in effect the php pages will be identicle in content to existing html. Duplicates! not good I thought. I was hoping for magic software to convert existing site -:


6:32 pm on Oct 6, 2004 (gmt 0)

10+ Year Member

If you don't want to change your existing filenames, just add this to your .htaccess file:

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

That will make your existing html files parse as php without changing the extension.




Featured Threads

Hot Threads This Week

Hot Threads This Month