I’ve done a lot of searching around forums, google, etc. trying to decide the best ways to utilize 301 redirects the “right” way and I’ve got a few different methods for different purposes, but I came across a question that perplexed me a bit.
What I want to do is redirect an entire subdirectory, which has about 25 pages in it.
For hypothetical purposes we’ll say the website is [noparse]http://domain.com/[/noparse]
What I want to do is redirect the subdirectory: [noparse]http://domain.com/abc/[/noparse] and its contents:
to a new subdirectory: [noparse]http://domain.com/def/[/noparse] that would have:
What I was thinking was to use a redirect in the .htaccess file
Redirect /abc /def
Do you think that would be the best way to redirect the entire directory to a new one or would there be a better way? or should I just:
<%@ Language=VBScript %> <% ' Permanent redirection Response.Status = "301 Moved Permanently" Response.AddHeader "Location", "http://www.website.com/" Response.End %>
On all of the pages. This is one I use for single pages, because I know it poses no problems, but I’d hate to do it 25 times…
Or something else perhaps…
My main goal is to improve the permalink structure for SEO purposes, but I don’t want to hurt anything in the meantime by using the wrong kind of redirect.
Any input would be appreciated!