Move to php: Naming files, search engines, and indexing

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
zman
Forum Newbie
Posts: 3
Joined: Mon Aug 29, 2005 11:13 am

Move to php: Naming files, search engines, and indexing

Post by zman »

I'm updating my online store with some php.

Since php is so prevalent now.. why not give all html pages ".php" extensions (even if they don't contain php) so that when they are indexed by robots you won't have a problem renaming files and ruining "index paths".

The problem I have now is, all my pages are indexed by google as ".html" and they will soon all be ".php". I can do a re-direct to the new .php pages, but again, why not just name them php to begin with? Even non-php html files.

Just wondering....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

performance reasons, most often. PHP still has to load the file, analyze for code it should execute and then spit out the file. You may also have issues if php has it's default content-type output switched from text/html to say text/plain
User avatar
zman
Forum Newbie
Posts: 3
Joined: Mon Aug 29, 2005 11:13 am

Post by zman »

feyd wrote:performance reasons, most often. PHP still has to load the file, analyze for code it should execute and then spit out the file. You may also have issues if php has it's default content-type output switched from text/html to say text/plain
Feyd.. Thanks for the quick reply!

I have a relatively small site with not a lot of business. I can't afford to loose the business I have. I don't really have any performance issues (I use a host and I'm way under allowables). Just seems to me like at some time in the near future all files will have some php on them so why not get the files named and indexed "correctly" now?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the fun part is, you can map any file extension you want to have php process them.. so you could really map .html to php, if you wish.

Although, I would suggest using a mod_rewrite or something similar to pass the request through to your scripts..
User avatar
zman
Forum Newbie
Posts: 3
Joined: Mon Aug 29, 2005 11:13 am

Post by zman »

Found the documentation to mod_rewrite and all it's optons....

Thanks very much. Great help and info!
Post Reply