• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

Redirectmatch from https to http - urgent

Hi,

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

RedirectMatch (.*)$ https://www.somewhere.com$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!

thanks
John
0
johnnygri99
Asked:
johnnygri99
  • 2
  • 2
1 Solution
 
mrielfCommented:
Use this in your httpd.conf:

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

0
 
periwinkleCommented:
Whoops- strike that - this one hasn't been abandoned - my apologies!!!
0
 
mrielfCommented:
:o)
0
 
periwinkleCommented:
(clearly not enough sleep last night)
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!

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