https to http for a folder

Discussion in 'Apache' started by qwikad.com, May 31, 2017.

  1. #1
    I'll try to explain this as best as I can.

    In my htaccess I redirect one addon domain from https to http:

    RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.com
    RewriteRule .* - [L]

    It works as it should.

    I uploaded a certain script to a folder in that addon domain directory that calls for a base url in its config file: $script_url = "";

    Let's say I uploaded it to "newfolder".

    I tried two things: $script_url = "http://mysite.com/newfolder"; and $script_url = "/newfolder";

    However now when I enter http://mysite.com/newfolder in to the browser it wants to redirect it back to https://mysite.com/newfolder

    I have no idea what a rewrite rule should be in this case. This doesn't work:

    RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.com/newfolder
    RewriteRule .* - [L]

    Any help is welcome.
     
    qwikad.com, May 31, 2017 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,264
    Likes Received:
    1,693
    Best Answers:
    31
    Trophy Points:
    475
    #2
    Got this solved. The script has its own htaccess file with a rewrite condition that somehow interfered with my other rewrite.
     
    qwikad.com, May 31, 2017 IP