WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Mod Rewrite Help for Moved blog (2 posts)

  1. dprior
    Member
    Posted 8 years ago #

    Hi all,

    I've searched but haven't been able to come up with much that has helped. Up unti today I had wordpress installed in domain.com/blog/. I have now moved it to the root. Everything is working just fine.

    The only remaining issue is that I want all requests for domain.com/blog/<whatever>/<is>/<here> to be redirected to domain.com/<whatever>/<is>/<here>.

    I know this is a question about rewrite more than wordpress, but I was hoping someone here could help. What's the rewrite rule I should use to accomplish this? Should I put it before the rewire rules that wordpress told me to paste into my .htaccess files or after? Thanks in advance.

  2. dprior
    Member
    Posted 8 years ago #

    I believe I figured it out after much playing with the mod-rewrite rules. I added this as the last rule:

    RewriteRule ^blog/(.*)$ /$1 [R=301,NC]

    Looks like it's working.

Topic Closed

This topic has been closed to new replies.

About this Topic