FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


how to make old html point to php





ptolomeo
I have renewed my webpage and renamed all the old pages with html to php extenson. The problem now is that google is full of 404 errors on the old indexation to my pages. So I wonder if it is possilbe to make simbolic archives with html extensions pointing to the php ones. Or if there is another (nicer) way to do that.
Thank you a lot
Diablosblizz
How many old pages do you have? If it is a small amount you could meta redirect them to your new .php pages. If there is a lot then you might be able to use .htaccess?
MrBlueSky
You can rename the files back to .html and add this line to ".htaccess" in your webroot:

Code:

AddType application/x-httpd-php .php


Files which end at .html or now parsed as PHP.

If you want to use .php you can use a rewrite-rule.
kv
just resubmit your site again to google. It may take a while, but once your site is re-indexed, it will remove the 404 error pages and the problem will go away.
BlueVD
I do remember reading docs on httpd at apache.org, and somewhere it has the option to look for other extensions in case someone mispelled. It was some time ago though.
so you could make a small .htaccess file with the directive in it and make it when it encounters an error accessing file xxx.html to try and point the user to xxx.php
manav
adding em to .htaccess is a nice option
Related topics
[DESIGNER] - Sites de Código HTML, JAVASCRIPT, PHP(PORUGUÊS)
Frontpage for HTML... ??? for PHP
how can i setup a page break for printer on html using php ?
Replace old HTML file, seem old copy is still running
How to change extension php to html but the php script still
How to parse a HTML with PHP ?
Need help with PHP script[RESOLVED]
html to php
SEO/ publish my php website
.html or .php?
learning HTML and PHP
Save as .html or .php
Method not allowed?
.html vs .php
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.