Re: Convert Site from HTML to PHP
Craven de Kere wrote:
For SEO this is not a good idea
Why not, specifically?
Quote:
Yes, depending on your server configuration only one will work unless they are explicitly requested. There's no real reason to keep both.
That is the same as it is always for files. They must be explicitly requested. The only files which are not are those that are configured in the httpd.conf (e.g. index.*) that load when directories are called.
The only thing that is changing is that the index.
php is loading now as the directory default, rather than the index.html. The index.html becomes just another file in the directory - like foobar.html...
This will remain the same, if one, two, or even more index.* files are in the directory.
There are called in order as defined by the "DirectoryIndex" designator in Apache's httpd.conf file.
I was considering keeping both, because the index.html files are specifically named in the search engines. The new index.php files are not and may not be for many months or longer.
The index.HTML files will serve when they are explicitly called, otherwise the index.PHP files will load with directory calls (and from links within the files that I have updated the links in).
Do you still see a problem with this? IF so, please explain.
Quote:
Use mod_rewrite to give a 301 redirect to the php version of the page. The 301 redirect is search engine friendly.
Something like this:
Code:RedirectMatch 301 (.*)\.html$ http://www.domain.com$1.php
I've heard about people using the following:
Code:
RewriteEngine On
RewriteRule ^(.*)\.html$ /$1.php [R=301,L]
They had problems with the search engines dropping their rank/standing. It went don't dramatically.
By the way, does your example cover all the sub-directories or just the main dir?
Also, why do people use the .htaccess files to do things like this? Is it because they do not have root access or something?
Quote:
I'd not do this if I were you, it would increase the load for every html page to have it parsed in the php engine and while it may be negligible I don't see any significant benefit.
I agree about not using it, and I too believe that the speed deciine would be mostly not noticed. The pages will be parsed either way -- html or php.
It's amazing how many people suggest that method though.
Craven, I used this forum to ask, because I know how good you are at this stuff, and I know that the forum attracts great people too.
Please let me know what you think about how I am planning to proceed (i.e. re-ordering the index.*). Specifically, if you know of any problems with this way.
Thanks a lot.
B-truE