I had a wordpress site installed in a sub folder with category/post-title permalink structure, which resulted in the following url structure
http://www.mysite.com/subfolder/category/post-title
However as I needed to move my site to the root folder and changed the permalink structure to year/month/post-title, which looks like below, users who visit my website through the links published on other websites see 404 error page as expected.
http://www.mysite.com/year/month/post-title
While doing the changes, moving wordpress to the root directory and changing permalink structure, I forgot to take into account that such problem could occur. Anyway, I made a mistake and now I’m trying to fix the problem.
I wonder is there a way to redirect the old urls to the new ones? Editing .htaccess or using a plugin or something else. The method doesn’t matter at this stage. All I want is to solve the problem
Any help?
Thanks in advance.
Use WordPress ⺠Redirection « WordPress Plugins, which will 301 redirect, import a csv of redirects and log 404s without having to deal with mod_rewrite and .htaccess.
mod_rewrite is what you’re looking for, if you have that kind of access to your server.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
If you’re using Apache, mod_alias or mod_rewrite should be the way to go. If you’re using IIS, you’ll need different solutions based upon whether you’re on IIS 6.x or IIS 7.x.