|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Changed from .html to .php website
Hi all, I would like some advice on what to do. I recently changed my .html website to .php to take advantage of using a common header and footer and menu.
I was told to use this in my .htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite.com RewriteRule (.*) mysite.com/$1 [R=301,L] RedirectMatch 301 (.*)\.html$ mysite.com$1.php All my page names are exactly the same, except for the extension, obviously. My problem is that now my domain name mysite.com/ returns a 301 as it gets redirect to index.php. I thought that if there was no index.html a browser by default would use the index.php? Also, google webmaster tools is giving me some warnings about pages being redirected , I thought my above .htaccess was SE 301 friendly?? Any suggestions? thanks Last edited by wbsr : February 6th, 2008 at 11:02 AM. |
|
#2
|
||||
|
||||
|
I think you have messed up everything, You should never mess with the htaccess file, COntact your web hosts and they will help you.
__________________
Linux web hosting Add links instantly, Business web site hosting, Frontpage web hosting, Internet marketing seo tips, Linux web hosting reviews |
|
#4
|
||||
|
||||
|
Try this:
RewriteEngine On(Don't change anything except the domain name).
__________________
ClickyB "The quality of the visitor is more important than the volume".. Egol 22nd Feb 2008
New to SEO? Start Here: SEO FAQForum Rules & Posting Guidelines |
|
#5
|
|||
|
|||
|
Thanks for the help, but ClickyB, your suggestion ends up directing to
for example mysite.com//index.php |
|
#6
|
|||
|
|||
|
Try:
Code:
RewriteEngine On
# sort www v non-www canonical URL issues:
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
# sort homepage canonical URL issues:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ /$1 [R=301,L]
# pass all .html request to .php equivalent files
RewriteRule ^(.+)\.html$ $1.php
__________________
New to SEO? SEOChat SEO FAQs Forum Rules and Posting Guidelines URL canonicalization code solutions |
|
#7
|
||||
|
||||
|
You may try out this as well....
Quote:
__________________
SEO FAQs - You might find your answer here. SEOchat Forum Rules - Read Before You Post **Do what you feel in your heart to be right- for you'll be criticized anyway. You'll be damned if you do, and damned if you don't.** |
|
#8
|
|||
|
|||
|
I am currently using Jagnet's suggestion, and it seems to be working just fine.
Thanks any idea how long it takes google to change the indexed pages to the .php version? |
![]() |
| Viewing: SEO Chat Forums > Other > SEO Scripts > Changed from .html to .php website |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|