Thank you for any help you can provide.
AshleyHow do i build a redirect from an asp site to a php site?
@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]How do i build a redirect from an asp site to a php site?
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 %26lt;Directory%26gt; 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]
No comments:
Post a Comment