disallowing a folder leads to "status code 500"

Home Forums BulletProof Security Free disallowing a folder leads to "status code 500"

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36328
    Philip Sheldrake
    Participant

    Hi,

    I’m trying to disallow a folder. In box 6 of the htaccess file custom code page, I have the following:

    # DENY ACCESS TO PROTECTED SERVER FILES AND FOLDERS
    # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
    # Files and folders starting with a dot: .htaccess, .htpasswd, .errordocs, .logs
    RedirectMatch 403 \.(htaccess|htpasswd|errordocs|logs)$
    disallow: /specifiedfolder/

    The last line causes the web server to return a Status Code 500 error, with the only fix being to ftp the previous version of the htaccess file, exactly the same in every way except not having the disallow line.

    Any ideas gratefully received.

    #36330
    AITpro Admin
    Keymaster

    “disallow” is not valid htaccess code. disallow is used in robots.txt files to tell Bots not to crawl a particular folder or file.  If the folder name does not start with a dot (.) then add the additional line of code below with the specific folder name.

    # DENY ACCESS TO PROTECTED SERVER FILES AND FOLDERS
    # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
    # Files and folders starting with a dot: .htaccess, .htpasswd, .errordocs, .logs
    RedirectMatch 403 \.(htaccess|htpasswd|errordocs|logs)$
    RedirectMatch 403 (specificfolder)
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.