Forum Moderators: mack

Message Too Old, No Replies

How to catch all .asp traffic on new html site

         

charliec

2:59 pm on Feb 16, 2007 (gmt 0)

10+ Year Member



Hi,
I have a site that has been written in .asp and has a couple of thousand pages, and gets around 300 visitors a day. It has a google pr of 4 on most pages, and has been around for about 4 years.

I am changing the way I run the business and no longer need an dynamic database driven site, and am also changing hosts.

I want to re make the main pages of the site in html (have frontpgage2003, although not used it yet), and have some sort of catch all that will pick up when an existing link (of which there are several hundred) that goest to a .asp page is clicked, and send to new hosting under html page.

Hope that all makes sense and someone can advise? I would have no objection to keeping as .asp, but will not have access to all the information on the current server when I transfer.

I really dont want to lose any traffic, or at least lose as little as possible when I make the change over.

Thanks

Charlie

Shetty

2:07 pm on Feb 17, 2007 (gmt 0)

10+ Year Member



you will have to do a 301 redirect

on a linux server:

create a .htaccess file on your server If you do not have an .htaccess file on your server, create a text file and name it .htaccess

If there is already an .htaccess file scroll down past the code that is already there and begin your new redirect instructions.

Put in your redirect information, which should look like this:

redirect 301 /dir/file.asp http://www.example.com/dir/abc.html

*Note: The first part "/dir/file.asp" is the location of the file being moved and the second part "http://www.example.com/dir/abc.html" is where the file is being moved. Upload the htaccess file to your server.

repeat the 301 for each of the asp file you are moving
so your htacess would have something like this

redirect 301 /dir/file.asp http://www.example.com/dir/abc.html
redirect 301 /dir/file1.asp http://www.example.com/dir/abc1.html
redirect 301 /dir/file2.asp http://www.example.com/dir/abc2.html

since you are doing for 100s of files you should possibly create the .htaccess file as you are doing each html