How Do I Build A Redirect From An Asp Site To A Php Site? Free RapidShare Download

How Do I Build A Redirect From An Asp Site To A Php Site?

February 9, 2010 under FAQ

My company switched from an asp site to a php site. We want to build redirects so that we don’t lose all of the good product reviews done by bloggers and other sources. Can someone give me the code so I can create these redirects. We were previously using network solutions. Now we are using joomla.
Thank you for any help you can provide.
Ashley

Search more about How Do I Build A Redirect From An Asp Site To A Php Site?:

  • flashbird

Comments

2 Responses to “How Do I Build A Redirect From An Asp Site To A Php Site?”
  1. Laogeodr says:

    Are all your URLs the same, except for a .php extension instead of .asp?
    If so, and if your server is running Apache, you can use the RewriteEngine to do this, either in a .htaccess file at the root of your website, or in a section of Apache’s configuration file that points to the root of the website.
    If this ISN’T the case, you’d need to provide more details about how your old and new URLs look.
    This is the code (if it doesn’t work, try replacing $1 with $0). It checks for any URLs ending in .asp and redirects the user to the same URL except with .php. (If you use .aspx or another extension, go ahead and change that.)
    RewriteEngine On
    RewriteRule (.*).asp $1.php [R,L]

  2. shrimpwa says:

    @Laogeodr… That is a valid solution but you will still lose credibility with Google. If you want to keep some of your page rank, your also need to send a 301 permanent redirect so the search engines will know that the link has changed.
    RewriteEngine On
    RewriteRule (.*).asp $1.php [R=301,L]

Leave a Comment

If you want a pic to show with your comment, go get a gravatar!