You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/05/27 05:49:40 UTC
DO NOT REPLY [Bug 45077] New: mod_rewrite regex stops parsing input
string at # character
https://issues.apache.org/bugzilla/show_bug.cgi?id=45077
Summary: mod_rewrite regex stops parsing input string at #
character
Product: Apache httpd-1.3
Version: HEAD
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: codehacker@comcast.net
I have html anchor id's appended to my html file names. Like:
myfile.php#anchorname
If I use mod_rewrite regex to match this filename, for example to re-cast the
anchor name as a query string value, regex does not recognize any part of the
filename after the # character.
Specifically, if the http request is www.mydomain.com/myfile.php#anchorname and
I'm using:
RewriteBase \
RewriteRule ^myfile.php#(.*) myotherfile.php?anchor=$1
the backreference $1 is never populated.
If I play with this for diagnostic purposes, I can try this:
http request is: www.mydomain.com/myfile.phpfoo#bar
RewriteCond %{REQUEST_URI} !testfile\.php
RewriteRule ^(.*) testfile.php?var=$1
and I can observe that the $1 backreference is populated with "myfile.phpfoo"
so you see that the # in the input string terminates the string matching and I
cannot capture that part of the string that follows #.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 45077] mod_rewrite regex stops parsing input
string at # character
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45077
Ruediger Pluem <rp...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Ruediger Pluem <rp...@apache.org> 2008-05-27 01:52:30 PST ---
Anchors are not sent to the server as part of the request. They are only used
locally by the browser. So httpd and especially mod_rewrite never sees the
anchor.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org