View Full Version : Static HTML to PHP
11-28-2004, 02:51 PM
I've spent the last few days (finally) learning about PHP. How do I make the move from static HTML to PHP without destroying my SERPS? So if I convert index.htm to index.php what do I do?
11-28-2004, 03:18 PM
I'm also curious about this one...
Maybe if bluewidgets.html is indexed and now would be build from index.php?item=bluewidgets, maybe using the item field to mod_rewrite it to bluewidgets.html
Cool avatar, makes me smile all the time.
11-28-2004, 05:39 PM
I am wondering initially if I do a straight mod rewrite to write index.htm to index.php will this mean no loss in terms of SERPS or PR? I want to convert the pages to php to take advantage of common headers and footers initially. With more advanced behaviour like you describe later.
Yes the photo is cute, the nicest one we have of my son. He certainly likes wearing that hat!
11-28-2004, 05:51 PM
Actaully if you want to take advantage of .php on your server side you can still keep your pages .htm as far as what the output is using mod_rewrite the rule is pretty simple it is something like
RewriteRule ^(.*).htm $1.php [L]
SEO Guy seems to be all static .html pages but on the server we are 100% php and rewrite our URL's this way :)
11-28-2004, 06:03 PM
OK I've found the easiest solution for me. It's to add another apache type using:
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
in my .htaccess files. This means anything in a html file is parsed with php.
Thanks SEO Guy, I'll add the rewrite rule as well so any new PHP files appear as htm file.
11-28-2004, 06:21 PM
yeah its less confusing and best to keep things consistant
11-29-2004, 05:10 AM
Just keep in mind that by doing so you are requesting the server to parsed using php. This can cause a lot of unnecessary load on the server and may even cause severe slow down in loading pages (if you have a lot of requests at the same time).
You can use html file and use php include:
Or you can create a function and include it through ssi.
In general php files are server-side, means upon being called they are parsed into regular html, so once being spidered all the se sees is plain html.
Let me know if you neem more help with php, I'll be glad to help.
vBulletin v3.0.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.