airadventure82
07-06-2007, 05:53 AM
I would like to redesign my website from .htm to ‘php. I do not want to loose my page rank or seo. Is there anyway to make php work on .htm. I’m also planning on making new pages in .php. I heard about 401 redirect but have no idea how it works. Can this be done? Can someone please help.
phpandmysql
07-06-2007, 06:05 AM
Put this into your .htaccess file
AddType application/x-httpd-php .php3 .phtml .php .php4 .html .htm
dhomba
07-06-2007, 08:14 AM
The above solution is the best
However you can also use apache redirect as
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/url/(.*).html
RewriteRule ^url/(.*) http://sitename/url/$1.php [L]
hadiman
07-06-2007, 08:17 AM
to redirect page, you use javascript
<script language="javascript">
location.href = "index.php";
</script>
:thumbsup:
airadventure82
07-06-2007, 03:31 PM
What elce do I need in the .htaccess file. I don't have one right now. Do I just make the file and put- AddType application/x-httpd-php .php3 .phtml .php .php4 .html .htm- in the file?
You need to check with your host that they allow mod_rewite and/or they allow you to use your own .htaccess. IMO, I wouldn't use the javascript redirect solution because the search engine spiders can probably see that and they won't like it!