Solved

Mod_Rewrite Subdirectory to Root 301 Redirect

Posted on 2011-03-03
1
1,127 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 500 total points
ID: 35032734
RewriteRule ^http://mysite.com/blog/(.*)$  http://mysite.com/$1 [R=301,L]

Open in new window

0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
What You Need to Know when Searching for a Webhost Provider
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
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.

705 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