Redirectmatch from https to http - urgent


I have a couple of folders being accessed via https as set by their htaccess files, which both contain the following:

RedirectMatch (.*)$$1

I would like to put a rule in the root folder of the website which ensures all other folders are not accessed via https - to effectively rewrite https to http for all folders apart from ones that contain the above.

OR there might be a couple of rules I can slot into a single htaccess file at the root? I've RTFM and am still scratching my head, I've got people breathing down my neck, please help!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use this in your httpd.conf:

        RewriteEngine on
        RewriteCond     %{HTTPS} !off
        RewriteRule   ^/([^/]+)/(.*)$$1/$2 [L]
        RewriteCond     %{HTTPS} off
        RewriteRule   ^/([^/]+)/(.*)$ - [L]
        RewriteCond     %{HTTPS} off
        RewriteRule   ^/(.*)$$1 [L]


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Whoops- strike that - this one hasn't been abandoned - my apologies!!!
(clearly not enough sleep last night)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.