PDA

View Full Version : parse or mod_rewrite?


landguy
09-24-2009, 03:10 PM
I am very new to this and advice would be appreciated.

I have a website that currently ranks well with google.
I am changing content providers and all of the current pages have a .htm extension.

I have written new code with the same page names except they have a .php file extension, I did this to have includes before I realized that you can parse .htm files to php

AddType application/x-httpd-php .htm

Since i am not using a database and using php only for includes. also from some things that i have read, google likes .htm over php my questions are.

1. should i mod_rewrite or parse?

2. If i do parse can i just change the file extensions of the current .php pages to .htm

3. and the old content provider/cms had every page off of the main directory www.site.com/page.htm , I would like to have subdirectories for pages, do i have to have a laundry list in the .htaccess for every page.

4. and would those redirects only be needed until search engines re-index?

I hope these are not stupid questions.

Thanks

charlesandrews
09-30-2009, 03:00 PM
As far as I know, Google now gives no preference to different file extensions. Some people have assumed this but in my (limited) testing I've never noticed it. To answer your other questions:

1. Either is fine.

2. Yes.

3. It's probably a good idea in case anyone has your original pages bookmarked or linked from their pages.

4. You should leave those redirects in permanently for the reasons above.

Your aim is to ensure that anyone who tries to access your pages through a URL which has moved will get 301 redirected to the new URL, and there could be links to your pages anywhere or in people's bookmarks. Best to leave some more stuff in the .htaccess than have people hit a 404 page.