1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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,151
    Likes Received:
    1,656
    Best Answers:
    29
    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