This is what I think will be difficult to pull off (at least for me) so I'm looking for some help. Here's the scoop: I have a WordPress blog in my site's root but a forum in the /forums directory. I am wanting to move the blog to a /blog directory and have nothing in the root. Essentially, I need to redirect users who are trying to access a blog post (which would be in the format of mysite.net/category/post-id_postname) to the same URL but in the blog directory (e.g. mysite.net/blog/category/post-id_postname). However, I want users who are trying to access a forum URL (anything with /forums in it such as mysite.net/forums/showthread.php?t=12345) to be left alone and un-affected by this change. Does this make sense? Any help with writing the rewrite rule for my .htaccess is greatly appreciated. Thanks.
Most of the Rewrite rules if correctly coded will not do that, because they would only be assigned to /category, etc, if they are assigned to everything (redirect everything), its an example of poor coding!
you could try this, there may be a better way of doing this, but RewriteCond %{REQUEST_URI} !(forums | blog) Rewriterule (.*) http://www.mydomain.com/blog/$1 [L,R=301] Code (markup):