SEO Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   SEO Chat ForumsOtherSEO Scripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread SEO Chat Forums Sponsor:
  #1  
Old February 4th, 2008, 07:11 PM
wbsr wbsr is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 wbsr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 20 m 36 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old February 5th, 2008, 06:51 AM
Never-Giveup's Avatar
Never-Giveup Never-Giveup is offline
Contributing User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 123 Never-Giveup User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 6 h 21 m 36 sec
Reputation Power: 5
Send a message via ICQ to Never-Giveup
Arrow

I think you have messed up everything, You should never mess with the htaccess file, COntact your web hosts and they will help you.
Comments on this post
ClickyB disagrees: (0) htaccess is just like html or any other code/script; it's perfectly ok to alter it (so long as
you don't mess it up)!

Reply With Quote
  #3  
Old February 5th, 2008, 08:02 AM
-mj-'s Avatar
-mj- -mj- is offline
Customized?
SEO Chat Beginner (1000 - 1499 posts)
 
Join Date: Jan 2007
Location: Budapest
Posts: 1,087 -mj- User rank is Sergeant (500 - 2000 Reputation Level)-mj- User rank is Sergeant (500 - 2000 Reputation Level)-mj- User rank is Sergeant (500 - 2000 Reputation Level)-mj- User rank is Sergeant (500 - 2000 Reputation Level)-mj- User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 18 h 22 m 45 sec
Reputation Power: 14
Send a message via Google Talk to -mj-
I am not an expert in this but try to add this line:

RewriteRule index.html$ index.php

If its not working take it out again
__________________
Budapest

Reply With Quote
  #4  
Old February 5th, 2008, 08:25 AM
ClickyB's Avatar
ClickyB ClickyB is offline
Scru u guys I'm goin home
Click here for more information. Click here for more information
 
Join Date: Mar 2004
Location: Gloucester (South West UK).
Posts: 3,859 ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level)ClickyB User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Months 10 h 39 m 16 sec
Reputation Power: 48
Try this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]

RedirectMatch 301 (.*)\.html http://www.mysite.com/$1.php
(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 FAQ
Forum Rules & Posting Guidelines

Reply With Quote
  #5  
Old February 6th, 2008, 11:01 AM
wbsr wbsr is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 wbsr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 20 m 36 sec
Reputation Power: 0
Thanks for the help, but ClickyB, your suggestion ends up directing to
for example
mysite.com//index.php

Reply With Quote
  #6  
Old February 6th, 2008, 01:24 PM
JagNet JagNet is offline
Smoke me a kipper...
Click here for more information
 
Join Date: Aug 2007
Posts: 1,514 JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level)JagNet User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 3 h 50 m 35 sec
Reputation Power: 25
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

Reply With Quote
  #7  
Old February 7th, 2008, 12:07 AM
pro_seo's Avatar
pro_seo pro_seo is offline
Moderator
SEO Chat Frequenter (2500 - 2999 posts)
 
Join Date: Apr 2006
Location: I N D I A
Posts: 2,752 pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level)pro_seo User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 4 Days 20 h 7 m 8 sec
Reputation Power: 33
Send a message via AIM to pro_seo Send a message via MSN to pro_seo Send a message via Yahoo to pro_seo Send a message via Google Talk to pro_seo Send a message via Skype to pro_seo
You may try out this as well....

Quote:
RewriteEngine on
RewriteBase /
RewriteRule (.*).html$ /$1.php
__________________

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.**

Reply With Quote
  #8  
Old February 11th, 2008, 01:12 PM
wbsr wbsr is offline
Registered User
SEO Chat Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 9 wbsr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 20 m 36 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: SEO Chat ForumsOtherSEO Scripts > Changed from .html to .php website


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway