Changing .htm to .shtml or .php to shtml search engines

This is a discussion on Changing .htm to .shtml or .php to shtml search engines within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Does anyone know if all pages in a fairly established site are changed from ..htm to .shtml or .php all ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-03-2007
David
 
Posts: n/a
Default Changing .htm to .shtml or .php to shtml search engines

Does anyone know if all pages in a fairly established site are changed from
..htm to .shtml or .php all of the search engine indexing will be lost? Other
than the file type change everything else remains the same including file
structure, linking etc..

David J.


Reply With Quote
  #2 (permalink)  
Old 01-03-2007
Rik
 
Posts: n/a
Default Re: Changing .htm to .shtml or .php to shtml search engines

David wrote:
> Does anyone know if all pages in a fairly established site are
> changed from .htm to .shtml or .php all of the search engine indexing
> will be lost? Other than the file type change everything else remains
> the same including file structure, linking etc..


Arrange a 301 redirect, and google understands, and the users that have
bookmarked parts of your site will thank you for not breaking their links.

If on apache, and mod_rewrite is possible for instance:

RewriteRule (.*)\.html$ $1.shtml [L,R=301]
--
Rik Wasmus


Reply With Quote
  #3 (permalink)  
Old 01-03-2007
Michael Fesser
 
Posts: n/a
Default Re: Changing .htm to .shtml or .php to shtml search engines

..oO(David)

>Does anyone know if all pages in a fairly established site are changed from
>.htm to .shtml or .php


There's no reason to do that. Cool URIs don't change, so keep the .htm.
If you need some server-side stuff like scripting or SSI you can do that
even on .htm files.

Micha
Reply With Quote
  #4 (permalink)  
Old 01-03-2007
Rik
 
Posts: n/a
Default Re: Changing .htm to .shtml or .php to shtml search engines

Michael Fesser wrote:
> .oO(David)
>
>> Does anyone know if all pages in a fairly established site are
>> changed from .htm to .shtml or .php

>
> There's no reason to do that. Cool URIs don't change, so keep the
> .htm.
> If you need some server-side stuff like scripting or SSI you can do
> that even on .htm files.


Parsing every .htm for the change it has some script in it is hardly
elegant.
Go for a 301 redirect. Browsers and search engineds understand that.
--
Rik Wasmus


Reply With Quote
  #5 (permalink)  
Old 01-03-2007
David
 
Posts: n/a
Default Re: Changing .htm to .shtml or .php to shtml search engines

Well, I was going to use ssi's for certain chunks of code (lots a pages) and
I am on a Win server. From a little research looks like there's no easy way
on a win server to 301 all pages like on Apache.

David




"Michael Fesser" <netizen@gmx.de> wrote in message
news:t2bmp25bu7piddatqe9i1adr1j1vb7u804@4ax.com...
> .oO(David)
>
>>Does anyone know if all pages in a fairly established site are changed
>>from
>>.htm to .shtml or .php

>
> There's no reason to do that. Cool URIs don't change, so keep the .htm.
> If you need some server-side stuff like scripting or SSI you can do that
> even on .htm files.
>
> Micha



Reply With Quote
  #6 (permalink)  
Old 01-03-2007
Michael Fesser
 
Posts: n/a
Default Re: Changing .htm to .shtml or .php to shtml search engines

..oO(Rik)

>Michael Fesser wrote:
>> .oO(David)
>>
>>> Does anyone know if all pages in a fairly established site are
>>> changed from .htm to .shtml or .php

>>
>> There's no reason to do that. Cool URIs don't change, so keep the
>> .htm.
>> If you need some server-side stuff like scripting or SSI you can do
>> that even on .htm files.

>
>Parsing every .htm for the change it has some script in it is hardly
>elegant.


It works well and doesn't cause much trouble for the server. If you use
PHP/SSI for more than just some little add-ons, then it will most likely
be used on every page anyway, so there's not really a problem by passing
all pages to the interpreter.

But if you don't like doing it that way - there are still other ways of
mapping URLs onto the file system. Keywords are mod_rewrite and content
negotiation (MultiViews), assuming an Apache webserver (you already
mentioned that some minutes ago in ciwah).

>Go for a 301 redirect. Browsers and search engineds understand that.


I consider that the worst idea of all, because it's completely
unnecessary and a sign of a broken URL design. The server should do the
work, not all the clients.

Micha
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0