Exclude directories within .htaccess

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ordovicium
    Senior Member
    • Nov 2001
    • 292
    • 4.2.x

    Exclude directories within .htaccess

    I use the .htaccess file to run vB5, and I guess there might be the issue. I have some directories, which are not part of the forum. E.g. Testing, SQLBackup, Stats,..
    When I try to access these folders by adding the name after the domain, I get an vB Error.
    Invalid Page URL. If this is an error and the page should exist, please contact the system administrator and tell them how you got this message.
    How to exclude some directories of the RewriteEngine logic?
    Sorry for my English
    Let'z talk German
  • Ordovicium
    Senior Member
    • Nov 2001
    • 292
    • 4.2.x

    #2
    Push
    Sorry for my English
    Let'z talk German

    Comment

    • William Thomas Jr
      Senior Member
      • Nov 2014
      • 526
      • 5.1.x

      #3
      Couldn't you just put an .htaccess file in one of those directories with:
      Code:
      RewriteEngine Off

      Comment

      • Ordovicium
        Senior Member
        • Nov 2001
        • 292
        • 4.2.x

        #4
        I use it to redirect to https

        Code:
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
        Sorry for my English
        Let'z talk German

        Comment

        • Ordovicium
          Senior Member
          • Nov 2001
          • 292
          • 4.2.x

          #5
          If I delete the htaccess file in the sub-directory it works. But need these directories secured.
          Sorry for my English
          Let'z talk German

          Comment

          • William Thomas Jr
            Senior Member
            • Nov 2014
            • 526
            • 5.1.x

            #6
            In your root directory you should have http redirected to https in .htaccess. I am unclear why any url under your main domain is not secure:

            https://www.christforums.org/forum/e...pecific-domain



            If that doesn't work a work around maybe to password .htaccess those directories.

            Comment

            • Ordovicium
              Senior Member
              • Nov 2001
              • 292
              • 4.2.x

              #7
              Originally posted by William Thomas Jr
              In your root directory you should have http redirected to https in .htaccess. I am unclear why any url under your main domain is not secure:

              https://www.christforums.org/forum/e...pecific-domain



              If that doesn't work a work around maybe to password .htaccess those directories.
              Sorry, missunderstanding. I mean with secured, that these directories must be password protected. So if remove the htaccess in the sub-directory, the site is reachable but not protected anymore.
              Sorry for my English
              Let'z talk German

              Comment

            Related Topics

            Collapse

            Working...