Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

switching from asp to php

best way to minimize damage?

         

htdawg

7:55 am on Dec 3, 2007 (gmt 0)

10+ Year Member



Hi I have a site built with asp, and I want to redesign it with php, what would be the best way to minimize loosing rankings, pagerank ect.. Its doing really well in google but due to problems with asp I need to change it soon. could someone let me know what steps to take in order to minimizing the losses.

Thanks

le_gber

1:16 pm on Dec 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi htdawg,

How big is you site? Migrating small sites (100's of pages) is a bit different than large sites (1000's of pages)

Will you keep the same structure and file names - apart from the extension? If you are then a 301 RedirectMatch is the best solution.

5ubliminal

1:30 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



Rebuild in PHP and use htaccess to rewrite the urls to look like the old ones. This way ASP will actually be processed as PHP.
Or you can 301 all the old .asp files to .php files. And, in theory, rankings will survive.
These are the easiest approaches and both are easy htaccess rewrites.

But it's a hard work especially for dynamic websites.
Good luck!

htdawg

1:48 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



hi,

thanks for the replies, the site is around 500 pages, of which around 400 are asp the rest are html. I will keep the html pages the same but the product pages in asp eg. "asp?ID1234"
will be the same in php maybe? php?id=1234 andjust redirect the old path to the new but keep the product id's the same.

tebrino

3:50 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



As 5ubliminal said, you can actually make PHP engine execute pages with *.asp extension as PHP.

5ubliminal

4:22 pm on Dec 3, 2007 (gmt 0)

10+ Year Member



#Add to .htaccess:
AddType application/x-httpd-php .asp

Will make .asp pages execute as .php scripts. So just change code from asp to php. That'll be fun!

PS: If you don't master PHP and htaccess I would advise against this daring action.

g1smd

10:53 pm on Dec 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Keep the same URLs ending in .asp active.

They can still be parsed as being PHP scripts.

htdawg

7:59 am on Dec 4, 2007 (gmt 0)

10+ Year Member



Hi,
thanks for the answers, by using htacces to rename the asp to php does that mean I can still use my database & whole admin ect.. even though it was built with asp, because I was going to change from windows hosting to unix hosting. Or would it be better to get someone to build me a new site with php (dynamic) and just add all the products & content over again.

g1smd

1:20 pm on Dec 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are many disconnected things here.

You can build a site using ASP or PHP scripts; which technology is the new site going to use?

In general, Windows IIS hosting often means that sites are built using ASP, but sometimes PHP is used.

When using Apache (Linux) hosting, the scripting language of choice is PHP.

There are several types of database that can be used to hold your data. MySQL is popular when using PHP scripts. For sites using ASP scripts, I guess you're forced to use some Microsoft "solution".

You can call your pages by whatever URLs you like. You can use PHP scripts on your pages but still keep your .asp URLs. That way, search engines would have no idea that anything at all has changed with the way the site works.

5ubliminal

12:37 am on Dec 5, 2007 (gmt 0)

10+ Year Member



htdawg ... I had a bad feeling about this.

To move to *ix hosting you need PHP code. ASP code will not work. Everybit of code has to be ported. And database has to be converted too. A lot of work only meant for a PRO.

Basicly all you will be left from old site will be database content and URL structure. (by using the .asp trick) Entrie coding has to change and this is 99% of time a full rebuild.

I suggest you ask someone to do it or just stick to your current hosting or you'll get in a worldfull of trobules.

If you have a static site it'll be a bit easier but still ... skills are required!

centime

1:08 am on Dec 5, 2007 (gmt 0)

10+ Year Member



I am not 100% sure

But you may find that using .htaccess to parse asp ext files as php is not always possible with certain hosting packages

I converted a valuable site to php from asp.net , simply to use a commercially available cms instead of continuing my own development

I could not redirect via any means, i canvassed every forum I know,

anyway, the site promptly tanked, and 6 months latter, well I hardly remember it exists :)

Perhaps it will recover

Hope you have better luck

Cheers

g1smd

1:42 am on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You don't need to redirect .php to .asp, and you don't need an internal rewrite either.

You just need either AddType or AddHandler to make this work.

centime

2:28 pm on Dec 5, 2007 (gmt 0)

10+ Year Member



yeah , I remember hours of attempting that,

verify with your host that php is configured to permit or enable the use of

addhandler & addtype in that way