entice Posted May 23, 2008 Share Posted May 23, 2008 I have redesigned a clients hideous website... and built the website as I normally do, to use PHP includes, this then changing the file name e.g. index.html to index.php they were not happy with this saying they will lose 3 months of indexed pages on google! Thus losing positions on google... I thought about includes, SSI, but don't the pages have to SHTML for this anyway? For this to work... so my real question is, a way round not losing the .HTML extension so I can use includes or some words to ease their fears about page ranking... if more info is needed leme know! cheers Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/ Share on other sites More sharing options...
Gamic Posted May 23, 2008 Share Posted May 23, 2008 You can have it so that it will put html pages through the php parser. You could have an iframe that opens up the new index.php from inside index.html You could have a link redirecting users to the new page These are just 3 options off of the top of my head, they are not necessarily the best solutions but I'm sure they'll help get the idea ball rolling. Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548068 Share on other sites More sharing options...
jonsjava Posted May 23, 2008 Share Posted May 23, 2008 you could do a rewrite to have php (or apache) automagically change .php?id=1 to index.html/id/1 or something like that. Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548070 Share on other sites More sharing options...
entice Posted May 23, 2008 Author Share Posted May 23, 2008 Yeah, tried suggesting a redirect, and frames are a no no, they will shoot me... they are as fussy as they get... the rewrite sounds interesting though... sound info so far Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548084 Share on other sites More sharing options...
moon 111 Posted May 23, 2008 Share Posted May 23, 2008 In your .htaccess file you can set it to change index.html to index.php. I think this might work, but I'm not sure: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*).html$ $1.php [L,QSA] Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548090 Share on other sites More sharing options...
haku Posted May 23, 2008 Share Posted May 23, 2008 If that doesn't work, this will: RewriteEngine on RewriteBase / RewriteRule ^([^.]+)\.html$ $1.php [L] Put this in your .htaccess file in the top directory. Anytime someone accesses ____.html, it will show up in the address bar as _____.html, but the actual contents will be the ______.php file you have encoded. Search engines cannot even tell that the page isn't really _____.html, and so the search ranking are not lost at all. Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548097 Share on other sites More sharing options...
entice Posted May 23, 2008 Author Share Posted May 23, 2008 thats the trick, will try it, and see cheers Link to comment https://forums.phpfreaks.com/topic/106935-page-rankings-from-html-to-php/#findComment-548108 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.