Skip to content

Commit

Permalink
Use (?s) option in RewriteRules
Browse files Browse the repository at this point in the history
The reason for doing this is that apparently some Apache binaries
are distributed linked to a PCRE library that considers character
0x85 a new line like character. On such Apache instances, the
redirect rules without (?s) will not work for URLs containing
characters that have a 0x85 byte in their UTF-8 expansion.
  • Loading branch information
Daniel Martin committed Jul 6, 2015
1 parent 28c37ec commit 6109d60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .htaccess
@@ -1,5 +1,5 @@
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
RewriteRule ((?s).*) public/$1 [L]
</IfModule>
2 changes: 1 addition & 1 deletion public/.htaccess
Expand Up @@ -3,5 +3,5 @@ AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
</IfModule>

0 comments on commit 6109d60

Please sign in to comment.