?
Solved

Mod_Rewrite Subdirectory to Root 301 Redirect

Posted on 2011-03-03
1
Medium Priority
?
1,129 Views
Last Modified: 2012-05-11
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
Comment
Question by:nplescher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
mwiercin earned 2000 total points
ID: 35032734
RewriteRule ^http://mysite.com/blog/(.*)$  http://mysite.com/$1 [R=301,L]

Open in new window

0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question