Help with my .htaccess

Discussion in 'Web Design & Development' started by XD, May 19, 2016.

Thread Status:
Not open for further replies.
  1. XD

    XD Resident Young Person Supreme Premium

    Minecraft Accounts: by9
    Messages:
    1,473
    Reactions:
    +429
    So, I have a chat script called AJAX-Chat

    it works fine, but only when I take away the part of my .htaccess file that makes my site always go to https://
    I need a way for a SPECIFIC directory to not be https://

    My .htaccess:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
     
    • Like Like x 1
  2. Frankfurt

    Frankfurt Member Banned Premium Restricted Account SR

    Messages:
    298
    Reactions:
    +92
    Shouldn't you post something like this on stackoverflow?
     
    Banned Forever For: Scamming (https://www.mc-market.org/threads/395704/)
    • Agree Agree x 2
  3. OP
    OP
    XD

    XD Resident Young Person Supreme Premium

    Minecraft Accounts: by9
    Messages:
    1,473
    Reactions:
    +429
    na
     
  4. Frankfurt

    Frankfurt Member Banned Premium Restricted Account SR

    Messages:
    298
    Reactions:
    +92
    You would have an answer by now though. People answer questions over there incredibly fast likes it's some sort of game.
     
    Banned Forever For: Scamming (https://www.mc-market.org/threads/395704/)
    • Informative Informative x 1
  5. RedSquareWeb

    RedSquareWeb Member

    Messages:
    28
    Reactions:
    +4
    I would be glad to help you out with your .htaccess. Contact me if you're interested!
    --- Double Post Merged, May 19, 2016 ---
    Anyways, my guess is that you're using a self-signed SSL certificate, and the AJAX script is rejecting it as a result. If not that, then perhaps the script needs to be able to access your SSL information in order to work (I'm not familiar with the specific script you're using, but most scripts that use websockets do need access to your SSL info)
     
    • Funny Funny x 2
  6. OP
    OP
    XD

    XD Resident Young Person Supreme Premium

    Minecraft Accounts: by9
    Messages:
    1,473
    Reactions:
    +429
    No, I use SSL from one.com
     
  7. RedSquareWeb

    RedSquareWeb Member

    Messages:
    28
    Reactions:
    +4
    Hmm. Then maybe it either a: needs access to your SSL info or b: may not be usable with SSL (a good script would work with SSL, but there's plenty of "bad" code out there).

    Unless you made the script yourself, could you link me to the script's github page / website?
     
  8. OP
    OP
    XD

    XD Resident Young Person Supreme Premium

    Minecraft Accounts: by9
    Messages:
    1,473
    Reactions:
    +429
    https://frug.github.io/AJAX-Chat/
    --- Double Post Merged, May 19, 2016 ---
    My question is how do I get rid of SSL on a certain directory
    --- Double Post Merged, May 19, 2016 ---
    Or page
     
  9. RedSquareWeb

    RedSquareWeb Member

    Messages:
    28
    Reactions:
    +4
    I'd try a Redirect Match for that.
    Note: I haven't tested this
    Code:
    RewriteEngine on
    RewriteRule ^script-dir/* http://yourdomain.com/script-dir [R=301,L]
     
  10. Dhruv Gramopadhye

    Dhruv Gramopadhye Member

    Messages:
    286
    Reactions:
    +57
    <3 AJAX!
     
Thread Status:
Not open for further replies.