[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1136
  • Last Modified:

Mod_Rewrite Subdirectory to Root 301 Redirect

Hello--
I would like to redirect all entries formatted like this:

mysite.com/blog/?p=980

to

mysite.com/?p=980

I am moving the CMS to the root of the site instead of a sub folder and I need to redirect all traffic that is still going to the old folder to the PROPER new location (so maintain the query string.... i.e, ?p=2848 but without the folder in there).


Thanks!
0
nplescher
Asked:
nplescher
1 Solution
 
mwiercinCommented:
RewriteRule ^http://mysite.com/blog/(.*)$  http://mysite.com/$1 [R=301,L]

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now