301 redirect and force correct path

Aug 24, 2012 at 12:10 AM
Edited Aug 30, 2014 at 9:15 PM
I am wondering if I renamed a page (which I did in DB) is there anyway of setting 301 redirect and tell it the new URL?    Second problem is I got duplicate url and Google is angry. How can I sort this?
Aug 27, 2012 at 9:09 PM

if you have big # of pages like that. i would create table: one column with the old urls (page names) and one column with the new urls

when razorC query the databse and will hit 0 results it will redirect user

if (data == null){Response.Redirect("~/rcError");}

i would remove the redirect and query the new table, if record found there, create permanent redirect , if still 0 records found redirect user to some error page....

Not sure what problem you have with google - permanent redirect it is recommended way of doing this and it tells the searchengine to use new url not the old one - so after they scan your site and update the index you can remove the extra step (the one where you check 2nd table)