You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Patrick Ritchie <pr...@videotron.ca> on 2008/02/23 17:47:32 UTC

[users@httpd] Problem with '$123' in url, mod_rewrite or apache bug?

Hi,

This pastie best expresses the problem I am encountering:

http://apache.pastebin.ca/913221

For some reason a url like 'http://my.sever.com/viewFullItem$123'

Is having the '$1' removed before I get a chance to process it. Now $1 
looks to me like a regex back reference, but I'm not sure if it's being 
stripped by mod_rewrite or a security feature of apache itself. I 
checked the RFC and '$' seems to be a safe character in HTTP.

The really odd thing is that I am getting the same results in my access 
log even if RewriteEngine is turned off, which leads me to suspect that 
the problem may be with the core server and not mod_rewrite.

Ideally I would just change the URL format to something not using a $, 
but it's a legacy url from the app that used to run on my domain, and I 
would like to redirect these urls to my legacy server.

Any ideas?

Cheers!
Patrick

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Problem with '$123' in url, mod_rewrite or apache bug?

Posted by Patrick Ritchie <pr...@videotron.ca>.
Wow don't I feel silly, that was it!

Thanks Joshua.
> On Sat, Feb 23, 2008 at 11:47 AM, Patrick Ritchie <pr...@videotron.ca> wrote:
>   
>> Hi,
>>
>>  This pastie best expresses the problem I am encountering:
>>
>>  http://apache.pastebin.ca/913221
>>
>>  For some reason a url like 'http://my.sever.com/viewFullItem$123'
>>
>>  Is having the '$1' removed before I get a chance to process it. Now $1
>>  looks to me like a regex back reference, but I'm not sure if it's being
>>  stripped by mod_rewrite or a security feature of apache itself. I
>>  checked the RFC and '$' seems to be a safe character in HTTP.
>>
>>  The really odd thing is that I am getting the same results in my access
>>  log even if RewriteEngine is turned off, which leads me to suspect that
>>  the problem may be with the core server and not mod_rewrite.
>>
>>  Ideally I would just change the URL format to something not using a $,
>>  but it's a legacy url from the app that used to run on my domain, and I
>>  would like to redirect these urls to my legacy server.
>>
>>  Any ideas?
>>     
>
> Your access_log entries show the URL when it is first received from
> the client, before any processing. These entries don't show any $1.
> This implies to me that your client is not sending the $1. If you are
> trying to access these urls using a shell-client, the shell might be
> grabbing the $1 before it even gets to the client.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>   


Re: [users@httpd] Problem with '$123' in url, mod_rewrite or apache bug?

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, Feb 23, 2008 at 11:47 AM, Patrick Ritchie <pr...@videotron.ca> wrote:
> Hi,
>
>  This pastie best expresses the problem I am encountering:
>
>  http://apache.pastebin.ca/913221
>
>  For some reason a url like 'http://my.sever.com/viewFullItem$123'
>
>  Is having the '$1' removed before I get a chance to process it. Now $1
>  looks to me like a regex back reference, but I'm not sure if it's being
>  stripped by mod_rewrite or a security feature of apache itself. I
>  checked the RFC and '$' seems to be a safe character in HTTP.
>
>  The really odd thing is that I am getting the same results in my access
>  log even if RewriteEngine is turned off, which leads me to suspect that
>  the problem may be with the core server and not mod_rewrite.
>
>  Ideally I would just change the URL format to something not using a $,
>  but it's a legacy url from the app that used to run on my domain, and I
>  would like to redirect these urls to my legacy server.
>
>  Any ideas?

Your access_log entries show the URL when it is first received from
the client, before any processing. These entries don't show any $1.
This implies to me that your client is not sending the $1. If you are
trying to access these urls using a shell-client, the shell might be
grabbing the $1 before it even gets to the client.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org