Solved

Mod_Rewrite Subdirectory to Root 301 Redirect

Posted on 2011-03-03
1
1,113 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
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ports for sccm 2012 1 64
Web Site Hosting 10 69
Autoresponder for Whole Domain in Plesk/Cpanel 2 51
Apache / XAMPP  authorisation 10 20
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now