I would like to redirect several aspx url's from website A to website B and then, if possible, redirect the remaining urls in a particular folder from website A to website B. Website A is .aspx and website B is .php.
Eg [INDENT]redirect www.websiteA.com/folder/url1.aspx to www.websiteB.com/correspondingurl1.php[/INDENT]
[INDENT]redirect www.websiteA.com/folder/url2.aspx to www.websiteB.com/correspondingurl2.php[/INDENT]
[INDENT]redirect www.websiteA.com/folder/url3.aspx to www.websiteB.com/correspondingurl3.php[/INDENT]
[INDENT]redirect all other url's from www.websiteA.com/folder/ to www.websiteB.com[/INDENT]
I have had a browse on some forums and have found that individual pages can be redirected using the following:
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";
However, if the old pages are removed from Website A, then this won't work. Is it possible to add some code to the web.config file?
I know almost nothing about aspx, so any help would be very much appreciated.