.html to .php
Moderator: General Moderators
.html to .php
Does changing the extension of php files to html (with a .htaccess file) make the pages more search engine friendly? If so, how?
I can't imagine it would. A php file just dumps HTML anyway so the *content* of the file would be the same. As for the file extension, I'm not sure search engines care. That said, I believe I've heard that *.shtml files are not indexed by all bots.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
- nickman013
- Forum Regular
- Posts: 764
- Joined: Sun Aug 14, 2005 12:02 am
- Location: Long Island, New York
Re: .html to .php
It depends on which search engine, however, lets focus on the big three, if we want to be reasonable. (Google, MSN, Yahoo).The Ninja Space Goat wrote:Does changing the extension of php files to html (with a .htaccess file) make the pages more search engine friendly? If so, how?
In that case, no. It doesn't. All three treat both equally. Of course, unrelated is that if a php file can't handle the load (infinite loop much!?), then the search engine won't see it as often. But thats not the file extension, thats the programming/availability of the page.
All three of the majors do.Pickle wrote:That said, I believe I've heard that *.shtml files are not indexed by all bots.
No, Roja. Thats the nick, its easy to remember. Am I sure? Roja.The Ninja Space Goat wrote:Are you guys CERTAIN?
Misleading. For the major search engines, that used to be true, but isn't any longer.Sami wrote:You might have heard it's better to have say: site/user/1062/
As a best practice, its still "better", because you can change content type (Moving from perl to php?) and won't have to update the url. That has nothing to do with the search engine. Search engines love query urls equally now.
Not sure what you mean by php code IN an html page. That doesn't quite make sense.nickman013 wrote:What if you had php code in a html page, would it work because I have gotten problems trying it?
- nickman013
- Forum Regular
- Posts: 764
- Joined: Sun Aug 14, 2005 12:02 am
- Location: Long Island, New York
For example
home.html
Would the php work?
Ive tried to do this before some times it worked, sometimes it didnt.
home.html
Code: Select all
<html>
<?php
php code
php code
?>
<font color=red>Whats up!</font>
</html>Ive tried to do this before some times it worked, sometimes it didnt.
Re: .html to .php
Of course, that's why I didn't imply otherwise.Roja wrote:Misleading. For the major search engines, that used to be true, but isn't any longer.Sami wrote:You might have heard it's better to have say: site/user/1062/
I was just trying to point him in the right direction since it was obvious that's the sort of thing he was talking about.
Re: .html to .php
It definitely wasn't obvious to me. The original question was specifically about making pages more search engine friendly. Those urls no longer have any impact on search engine friendliness.Sami wrote: I was just trying to point him in the right direction since it was obvious that's the sort of thing he was talking about.