Cannot get 301 redirection in htaccess to work (either Redirect or Rewrite)
The ^ in your rewriterule means the URL must begin with the postname, as in your new structure – so what you’re saying in that second line is, “redirect http://www.example.com/postname to http://www.example.com/postname“. So it’s the ^ that’s throwing things off. If you were previously using URLs like http://www.example.com/categoryname/postname/ then I would suggest instead: RewriteEngine On … Read more