Forum Moderators: phranque

Message Too Old, No Replies

Best Way to do Page Redirects after a Redesign?

redirecting pages after changing file names

         

DXL

8:49 pm on Nov 9, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been redeveloping sites with HTML pages to Wordpress. The old pages obviously still show up in Google SERPs, I need the replacement Wordpress pages to take priority, and for the old ones to drop off.

If example.com/widgets.html is now example.com/widgets, what's the best way to set up a permanent redirect for that specific page? Is this something I do entirely in the .htaccess file? If so, how I would I add the coding to the file so that it redirects, and would I need to delete the old html page after doing so?

lucy24

10:23 pm on Nov 9, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



would I need to delete the old html page after doing so?

If the redirect is correctly coded, it makes absolutely no difference of any kind whatsoever, because no visitor will have any way of knowing whether the page exists or not. Personally I'd keep the page files-- but not on your production server. Stash them somewhere else for safekeeping.

There is an extremely recent thread [webmasterworld.com] about redirecting after a format change. Look it over first.

DXL

1:37 am on Nov 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But how do I actually set the redirect up in the first place? What do I need to add to the .htaccess file?

lucy24

6:03 am on Nov 19, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What do I need to add to the .htaccess file?

It all depends on what's there already. Wander over to the Apache subforum [webmasterworld.com] and read a few threads. You'll see that certain types of questions get asked-- and answered-- over and over again. If you're looking for a copy-and-paste solution, there exist forums for that ... but WebmasterWorld isn't one of them :(