Welcome to WebmasterWorld Guest from 54.161.255.61

Changing file extensions

   
5:18 pm on Nov 2, 2005 (gmt 0)

10+ Year Member



Hello,

I have a client who currently ranks very well with their .asp site. They are in the process of changing their whole site to .php. I told them to do 301 re-directs if possible to the new pages, but that rankings would suffer until the engines crawl the new pages. Is this correct?

Also, some of their ranking pages on the old site will become directories on the new site. So for example:

OLD page: mydomain.com/ranking.asp
NEW page: mydomain.com/ranking

All links to the NEW pages will be to the directory paths. Will the search engine rank directory paths? Any problem with this method?

Thanks for any help.

11:52 pm on Nov 2, 2005 (gmt 0)

10+ Year Member



From great advice on this forum I made the change from html to php without changing extensions . . . just changed my htaccess to parse html as php. I'd recommend a search on Google or this forum for how to do the same but with asp to php. I think it's doable and might save you the terror of risking 301's particularly with all the changes already going on.
12:42 am on Nov 3, 2005 (gmt 0)

10+ Year Member



are you familar with mod rewrite? You should be able to do this so that the names will not need to change.
1:51 am on Nov 3, 2005 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Add one line to your .htaccess file to let .asp pages be parsed for their PHP content. No need to change any lninks then!
1:55 am on Nov 3, 2005 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



If you are linking to directories, make sure you always use the trailing slash otherwise the server has to issue a redirect to add it:

http://www.example.com/ranking[b]/[/b]

For everything else, simply do not change the filenames. Assuming you are running Apache, add this to your root-level .htaccess:

AddHandler application/x-httpd-php .asp

Then you can alter your PHP app to use the .asp extension.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month