2

I understand .htaccess and mod_rewrite on a fairly basic level, and have just started learning ForceType and SetHandler directives.

This is my .htaccess file for my domain, testsite1.localhost (only accessible via 127.0.0.1 as indicated in the URL):

<Files .+*^$[]()>
ForceType application/x-httpd-php
SetHandler application/x-httpd-php
</Files>

What does the part after files mean? For some reason it seems to work, although I'm not sure why.

Please can someone help? I've been learning about this off Google, but other users' experience with this is welcomed!

Thanks

1 Answers1

1

The regular expression does not look well-formed, and even if it parsed it would not be able to match any string as far as I can tell, since some of the components of it are contradictory (sequence of 1-or-more of any characters, followed by beginning of a line will never match).

If this is Apache 2.0 or later, you can test a regex with the "pcretest" tool that comes with the regex library used by Apache.

"man pcresyntax" will show you the basics of regular expressions, but that particular regex will never make sense.

I assume the entire thing is a no-op. Don't use anything with Type in it to tag files as being handled by PHP -- SetHandler alone is sufficient.

covener
  • 1,665
  • 9
  • 15