Forum Moderators: mack
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
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