https://issues.apache.org/bugzilla/show_bug.cgi?id=54866
Bug ID: 54866
Summary: Can't end RewriteCond with space
Product: Apache httpd-2
Version: 2.2.24
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Hello
I figured out that
RewriteCond can't handle space before the end of line.
(also end of Regular Expression)
let say I have "something.txt"
and I apply RewriteRule like this
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET\ \/somethinggreat(?:\?\S*)?\
RewriteRule ^(\/?).* $1something.txt [L]
</IfModule>
(You can't see it but it has a space character at the end of RewriteCond)
Apache will return 500 error.
To fix this at .htaccess level I have to put something dummy at the end of
line.
like this
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET\ \/somethinggreat(?:\?\S*)?\ .
RewriteRule ^(\/?).* $1something.txt [L]
</IfModule>
this will make Apache function normally as expected.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]