Forum Moderators: phranque
Could I have an rule that makes all .php seems like they are .htm?
I suppose yes,
but could I have that rule having .htm pages and .php pages as well?
All links goes to myhomepages.htm
This code I have in .htaccess to prevent spiders index non www.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule (.*) [mysite.com...] [R=301,L]
I have one homepage,
and four other index.htm pages in directories.
Are you wanting to serve the information from the php file to equivalent htm files? (Recommended if you will be changing a portion of files to dynamic)
OR
301 (Redirect) the htm files to the php files? (Not recommended)
OR
Have your current htm files parsed as php, so you do not have to change extentions? (Recommended if you will be changing all files to dynamic)
The answer for all 3 is different, and I am not sure what you are looking for. There is some basic information about mod_rewrite in the Apache Library [webmasterworld.com] that might help you understand what mod_rewrite is and does.
Please, let us know.
Justin
The rest of pages including the index files are still .htm
I want to do some changes, as inserting searchers etc, so bit by bit some pages will change extension from .htm to .php at this moment I will change 200 pages to .php and maybe later on as well the index pages will change to .php.
Though the searchengines have indexed about 250 .htm files and 30 .php files,
Wouldnīt the best be to forget about the 30 .php files and tell the searchengines to index all .php files to .htm so that I can keep on changing all files to .htm?
I am a bit lost, and very frightened about changing the extension, though we are very well positioned in search engines.
Is that the best choise?
This wonīt give me any problems with searchengines?
Will this give an delay in browsing though the server needs to parse the pages.
Doing that the pages that already is called .php should I rename them to .htm or can they stay that way?
The AddHandler should be fine, as long as you have mod_mime installed -- You will know if you try it. It will either work or you will get a 500 server error
With the size of your site, the Handler should not be a problem for either server load or load time.
I have heard some horror stories about changing extentions, so I think it is much better to avoid it -- at least one SE (Google) views new extentions as new pages, and may determine your entire site is new if you change them...
You should not need to change any page names -- the php should be fine the way they are, and the .htm will be run through the php engine the same as php pages.
Hope this helps.
Let us know if you get stuck.
Justin
-- not processed as PHP
HTTP/1.1 200 OK
Date: Wed, 09 Nov 2005 22:41:51 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) FrontPage/5.0.2.2623 mod_ssl/2.8.22
OpenSSL/0.9.7e
Last-Modified: Sun, 26 Jun 2005 23:14:32 GMT
ETag: "85c94-379b-42bf36d8"
Accept-Ranges: bytes
Content-Length: 14235
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
-- processed as PHP
HTTP/1.1 200 OK
Date: Wed, 09 Nov 2005 22:41:03 GMT
Server: Apache/1.3.33 (Debian GNU/Linux) FrontPage/5.0.2.2623 mod_ssl/2.8.22
OpenSSL/0.9.7e
Connection: close
Content-Type: text/html
The first option:
Are you wanting to serve the information from the php file to equivalent htm files? (Recommended if you will be changing a portion of files to dynamic)
Actually I really donīt know what it is and why should I only use it if a portion of files will be changed.
Maybe is better than option 3.
Definitevily I will not do an redirect (option 2)