Skip to content
Snippets Groups Projects
Commit 93de2278 authored by Simon Deziel's avatar Simon Deziel
Browse files

Add a brief comment explaning non-capturing group regexes


Signed-off-by: default avatarSimon Deziel <simon@sdeziel.info>
parent 81b70148
No related branches found
No related tags found
1 merge request!13debian: use non-capturing group with FilesMatch
# This file replaces old system MIME types and sets them only in the
# Apache webserver
# Using (?:pattern) instead of (pattern) is a small optimization that
# avoid capturing the matching pattern (as $1) which isn't used here
# application/x-httpd-php phtml php
<FilesMatch ".+\.ph(?:ar|p|tml)$">
SetHandler application/x-httpd-php
......
......@@ -6,6 +6,8 @@
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
# Using (?:pattern) instead of (pattern) is a small optimization that
# avoid capturing the matching pattern (as $1) which isn't used here
<FilesMatch ".+\.ph(?:ar|p|tml)$">
SetHandler "proxy:unix:/run/php/php@PHP_VERSION@-fpm.sock|fcgi://localhost"
</FilesMatch>
......
# Using (?:pattern) instead of (pattern) is a small optimization that
# avoid capturing the matching pattern (as $1) which isn't used here
<FilesMatch ".+\.ph(?:ar|p|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment