Bad Regex in .htaccess file

Discussion in 'Templates customization' started by busybody, Dec 18, 2010.

  1. busybody

    busybody New Member

    Joined:
    Sep 6, 2009
    Messages:
    6
    Because I run with AllowOverride None, I created a <Directory> directive for each .htaccess in the aMember package.

    Apache 2.2 failed the configuration change with the message "Regex could not be compiled". The problem is in the .htaccess file in /amember/includes/kcaptcha/fonts. The file has the following statement:
    <Files ~ "*">
    The regular expression: "*" is the culprit. In a regular expression, the * symbol specifies the previous symbol may occur 0 or more times. Because there is no previous symbol in the expression, therefore the expression is meaningless. I assume the intended meaning is to apply the enclosed directives to all files in the folder.

    Therefore I changed the line to the following correct syntax:
    <Files ~ ".*">
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Thank you for reporting it! Actually there is no need in regular expressions at all.
    Fonts must not be available outside, so .htaccess must be just:

    Order allow,deny
    Deny from all

Share This Page