High Rankings Search Engine Optimization ForumHigh Rankings Advisor Search Marketing Newsletter

Welcome Guest ( Log In | Register )

Important Announcement: *Written SEO Website Reviews Available*
 
Reply to this topicStart new topic
> Page Name Extensions, updating site from htm to php
escocia1
post Dec 5 2007, 02:19 AM
Post #1


HR 2
**

Group: Active Members
Posts: 30
Joined: 22-January 04
User's local time:
Jul 31 2010, 08:54 PM
Member No.: 1,997



when doing a PHP makeover to a basic HTML site
i duplicate content as samepagename.php

will the SE's think i'm trying to trick them?

how should i handle the changeover to maintain our high rankings?
Go to the top of the page
 
+Quote Post
chrishirst
post Dec 5 2007, 02:21 AM
Post #2


HR 9
Group Icon

Group: Moderator
Posts: 4,574
Joined: 13-August 03
User's local time:
Aug 1 2010, 12:54 AM
From: Blackpool UK
Member No.: 492



QUOTE
will the SE's think i'm trying to trick them?
No.


QUOTE
how should i handle the changeover to maintain our high rankings?

Don't change the page extension.
Go to the top of the page
 
+Quote Post
Randy
post Dec 5 2007, 07:30 AM
Post #3


Convert Me!
Group Icon

Group: Admin
Posts: 17,540
Joined: 17-August 03
User's local time:
Jul 31 2010, 06:54 PM
Member No.: 551



Best options where the search engines are concerned:

1. Don't change the page names. Instead configure the server to parse .htm files through the php engine.

2. If you can't do this, make sure you set up 301 redirects of all .htm pages to their correspnding .php page.
Go to the top of the page
 
+Quote Post
Deverill
post Dec 5 2007, 12:02 PM
Post #4


HR 4
****

Group: Active Members
Posts: 218
Joined: 14-March 04
User's local time:
Jul 31 2010, 07:54 PM
From: Key West, Florida USA
Member No.: 2,878



What would be the effect on search engines if you use a .htaccess file? I have one that does this:
CODE
AddHandler application/x-httpd-php .html .htm
RewriteEngine on
RewriteBase /
RewriteRule (.*).htm$ /$1.php

and in the browser at least it looks like I'm hitting xyz.htm but it's really xyz.php on the server. Is there any good or bad for the SE's doing it this way?

BTW, I had to do this because my web host had an internal problem when upgrading and my PHP was broken when I called it .htm. (IMG:style_emoticons/default/rolleyes.gif)
Go to the top of the page
 
+Quote Post
Randy
post Dec 5 2007, 02:29 PM
Post #5


Convert Me!
Group Icon

Group: Admin
Posts: 17,540
Joined: 17-August 03
User's local time:
Jul 31 2010, 06:54 PM
Member No.: 551



The engines won't be able to see anything that's happening in the background prior to the page being delivered Deverill, so you're good.

The only thing to concern yourself with is to make sure you're linking to the .htm versions of pages so that you don't start getting both the .htm and its exact duplicate .php page indexed.
Go to the top of the page
 
+Quote Post
escocia1
post Dec 5 2007, 05:01 PM
Post #6


HR 2
**

Group: Active Members
Posts: 30
Joined: 22-January 04
User's local time:
Jul 31 2010, 08:54 PM
Member No.: 1,997



ok, well, i dont know much about "parsing thru the php engine"
and i've just completed the makeover so we now have all the new page extensions .php
so i guess what i need is 301 Redirect from each page.htm to page.php ?

would a mod_rewrite suit this specific situation?

what would the code for the .htaccess file be?



Go to the top of the page
 
+Quote Post
escocia1
post Dec 5 2007, 05:41 PM
Post #7


HR 2
**

Group: Active Members
Posts: 30
Joined: 22-January 04
User's local time:
Jul 31 2010, 08:54 PM
Member No.: 1,997



by the way, this is a very small site with only 30 static html pages

from reading around the forum i'm guessing that an .htaccess is going to be fine

i just need the code, would this be a good guess?
CODE
RewriteEngine on
Redirect 301 http://www.mysite.com/oldfile.htm http://www.mysite.com/newfile.php


but then i'd need to have a long list of the 30 or so pages, right?
or can i do it with an wild card?

CODE
Redirect 301 http://www.mysite.com/*.htm http://www.mysite.com/*.php

Go to the top of the page
 
+Quote Post
Randy
post Dec 5 2007, 10:26 PM
Post #8


Convert Me!
Group Icon

Group: Admin
Posts: 17,540
Joined: 17-August 03
User's local time:
Jul 31 2010, 06:54 PM
Member No.: 551



You're on a Unix/Linux server, right? It'll have to be for .htaccess to work, so I'm going to assume this is the case.

If you want to test the .htm processed at .php so that you don't have to change your file extensions, here's a little test you can run.

In an .htaccess file at the root level of your site put the following line:
CODE
AddType application/x-httpd-php .php .htm .html


Then create a new file that's named with an .htm or .html extension, putting the following in it:

CODE
<?php
phpinfo();
?>


Upload that file to your server and pull it up in your browser. If you get a page full of information about your server's php installation you know you can name files with .htm or .html but have them sent through the php parser. This is the simplest and safest way to accomplish what you're trying to do, because you can keep all of you current .htm/.html filenames.

If you do need to redirect, you're probably best off using RedirectMatch since it's available on more servers and a little bit easier on the server load. A single line would handle it for every page, as long as you're not going to have any .htm files left. Assuming your current files carry a .htm extension the.htaccess in this case would look like:
CODE
RedirectMatch 301 (.*)\.htm$ http://www.yourdomain.com/$1.php
Go to the top of the page
 
+Quote Post
escocia1
post Dec 5 2007, 11:22 PM
Post #9


HR 2
**

Group: Active Members
Posts: 30
Joined: 22-January 04
User's local time:
Jul 31 2010, 08:54 PM
Member No.: 1,997



thanks a million Randy! You're a saviour!

yes, its Linux.

now, i think your first solution via the PARSER is the most appropriate
and seems to be the most professional
but i'm kind of scared (i'm still new to php) cause i dont understand:

how i can keep all my files as .htm (locally on my PC)
and have them functioning as php files on the server, hmm?
would everything still work together inside dreamweaver on my PC for example?

does it make .htm and .php kind of interchangeable? and ultimately make no difference?

i'll try to get my head around it!
thanks again!



Go to the top of the page
 
+Quote Post
escocia1
post Dec 6 2007, 12:45 AM
Post #10


HR 2
**

Group: Active Members
Posts: 30
Joined: 22-January 04
User's local time:
Jul 31 2010, 08:54 PM
Member No.: 1,997



i see that there's a slight loss of functionality
when local pages arent .php they dont display right inside dreamweaver
but this is minor and i think the PARSING solution is still very attractive!
(i'll probably end up choosing this solution)

the main point here is Search Engine rankings
the .htm pages have had great rankings for years
what would i stand to lose if i go ahead with the changeover to .php extensions and apply the RedirectMatch 301 method?
Go to the top of the page
 
+Quote Post
Randy
post Dec 6 2007, 07:49 AM
Post #11


Convert Me!
Group Icon

Group: Admin
Posts: 17,540
Joined: 17-August 03
User's local time:
Jul 31 2010, 06:54 PM
Member No.: 551



The 301 will eventually help the .php pages replace the .htm pages. The issue being the eventually part.

If you change the filenames you'll probably see some fluctuation and experience some pain for 4-6 months while the search engines catch up. If you simply have the .htm pages sent through the php parser you shouldn't have any such wait.

This 4-6 month window is the gist of the issue.

Personally, I'd simply have the .htm pages parsed as php. It's very common these days and most hosts allow this type of thing, so you're not really painting yourself into a corner should you need to change hosts down the road somewhere.
Go to the top of the page
 
+Quote Post
Deverill
post Dec 6 2007, 04:55 PM
Post #12


HR 4
****

Group: Active Members
Posts: 218
Joined: 14-March 04
User's local time:
Jul 31 2010, 07:54 PM
From: Key West, Florida USA
Member No.: 2,878



QUOTE(Randy @ Dec 5 2007, 04:29 PM) *
make sure you're linking to the .htm versions of pages so that you don't start getting both the .htm and its exact duplicate .php page indexed.

Great point, Randy, but in my case I'm safe.
Thanks!
Go to the top of the page
 
+Quote Post
jbettencourt
post Jan 30 2008, 03:27 PM
Post #13


HR 2
**

Group: Active Members
Posts: 27
Joined: 1-February 06
User's local time:
Jul 31 2010, 04:54 PM
Member No.: 10,314



QUOTE(Randy @ Dec 6 2007, 05:49 AM) *
The 301 will eventually help the .php pages replace the .htm pages. The issue being the eventually part.

If you change the filenames you'll probably see some fluctuation and experience some pain for 4-6 months while the search engines catch up. If you simply have the .htm pages sent through the php parser you shouldn't have any such wait.

This 4-6 month window is the gist of the issue.

Personally, I'd simply have the .htm pages parsed as php. It's very common these days and most hosts allow this type of thing, so you're not really painting yourself into a corner should you need to change hosts down the road somewhere.



Randy,

After searching through the forums, your reply is the closest I've found to an explanation of the consequences of doing a 301 redirect for individual page renaming. Can you outline the negatives in a little more detail?

Here's my situation. We've got a web site with over 10,000 pages indexed. The majority of these pages are of the form: www.domain.com/equipment_for_sale.html?equip=XXXXX. This basically represents one page for each item in our catalog. Now, we have to do a complete technology overhaul which will include re-writing the website in a new language/technology. The old site uses an obscure scripting language (Lasso) which is parsed and processed similar to any other scripting language such as .asp or php. The site will be rewritten using java technologies (I'm not familiar with them). The team expects to change file names and/or extensions. I'm concerned.

301 redirects were proposed as a solution to the problem but I was pretty sure that there were drawbacks to that solution. Can you help me itemize these drawbacks and any details that would help support/explain them. We have a huge dependency on our Google traffic (I know we should have other marketing channels) and I want to be able to define the risks of changing all our page names and/or extensions overnight with redirects for the old names / extensions.

Some questions that come to mind are:
1. Does Google re-evaluate pages and rankings with large changes like that?
2. Will the old pages remain indexed long enough for the new pages to get indexed?
3. Will page rank be transferred to the new pages?

Thank you so much for your help!
Go to the top of the page
 
+Quote Post
Randy
post Jan 30 2008, 03:52 PM
Post #14


Convert Me!
Group Icon

Group: Admin
Posts: 17,540
Joined: 17-August 03
User's local time:
Jul 31 2010, 06:54 PM
Member No.: 551



QUOTE
1. Does Google re-evaluate pages and rankings with large changes like that?


Yes. But they do this anyway, even if there are no changes to the page uri and only on-page changes. So no great worries there. Or no greater than with any other revamp.

QUOTE
2. Will the old pages remain indexed long enough for the new pages to get indexed?


Usually Yes. In fact, you'll probably still see the old pages in the index for weeks or months after employing a 301 redirect. Typically those pages will stop ranking well in the SERPs, with the new page sort of taking over the old page's place. But it's still a bit of a crapshoot because it's not really a 1+1=2 situation. This is where the lag time and pain can come into the picture.

QUOTE
3. Will page rank be transferred to the new pages?


This seems to be the case. Eventually. Again, it's not immediate. Expect a bit of a struggle for a few months if your good rankings depend in a significant way to incoming links. If you can you'll also want to track down as many links out there that are pointing to individual page urls --as opposed to pointing to the base domain name without any page filename-- as you can find. Contact those webmasters and let them know about your structure change. Suggest the URL that is replacing the one they used to link to. Then cross your fingers and hope some of those folks tweak their linking code to point to your new page.

The real downfall comes into the picture if you have a significant number of links that point to pages instead of to your base domain. If the vast majority point to the domain name only it seems to speed up the process quite a bit. I had to do this with a site for a friend last October (complete structure change, page uri's, subdirectory structure, the whole ball of wax) and due diligence to make sure we provided the engines a good map to what we were doing had it all basically sorted in 4 weeks or so. The site really never fell out of it's good ranking positions because either the old page was still in the SERPs or the new page was.

However as a cautionary note this site had probably 98% of links that pointed towards it being directed to the base domain name, with no filename in the mix. So we didn't even have to make a big project out of getting others to change their links because they were still 100% valid.

By the same token I've done it with other sites that had many links pointing to the base domain, but a larger percentage pointing towards this or that individual internal page that struggled far more. In those cases you're probably looking at a good 4 months at a minimum. With at least a few weeks in there where your search engine traffic is going to take a hit.
Go to the top of the page
 
+Quote Post

  
Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



This forum is sponsored by High Rankings, a Boston SEO Agency
- Lo-Fi Version Time is now: 31st July 2010 - 06:54 PM