Forum Moderators: phranque

Message Too Old, No Replies

switching from windows to linux

can .htaccess help me renane from asp to php to avoid losing ranks?

         

rominosj

7:28 pm on Apr 20, 2005 (gmt 0)

10+ Year Member



My site is on a windows server with Access database, ASP pages, and need/want to migrate to linux to use php /mysql database, but I don't want to lose my current search engine ranks.

So, is it possible to rename asp pages to php pages using .htaccess? and how about htm pages to php?

If possible, what would be the best way, and what would be the best way to redirect users who don't find a page that is not found because of the server change, but without alarming SE about with the redirects.

Thanks,

jdMorgan

11:26 pm on Apr 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By far the easiest thing to do is to leave all your URLs and filenames as they are, and simply tell Apache to parse .asp pages as php. File extensions have no intrinsic meaning to Apache or to browsers. The server configuration and MIME-type response headers control how files of each type are handled, and you can control that.

See Apache AddHandler

My advice is to never serve a search engine something different than you serve a human visitor. Some of those human visitors are robots, and some of those robots are search engine employees. So don't risk your site using a sneaky rewrite/rediret technique intended to serve humans and search engines different content for SEO purposes unless you are willing to invest the time and money to do IP-based cloaking and to keep your cloaking IP address database up-to-the-minute. For missing pages, use a 404 or 410 server response, and after the visitor has read that page, link and/or meta-refresh to your site map, home page, search page, or any or all of those.

Jim