You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nico Nieuwoudt <ni...@gmail.com> on 2011/12/09 11:18:21 UTC

[users@httpd] Apache not decoding %2f to / in URL

Hi

I've seen some topics regarding %2f ( URL encoded / ), but still having
problem after suggested solutions.

I have the following entry in httpd.conf (Apache v2.2)

<VirtualHost x.x.xx.xxx:80>
    AcceptPathInfo On
    AllowEncodedSlashes On
</VirtualHost>

and after passing an error page URL from httpd.conf, entry:
ErrorPage http://x.x.xx.xxx%2ferror.html (which should be encoded as
http://x.x.xx.xxx/error.html)

I get the follwing from all browsers e.g
Firefox can't find the server at x.x.xx.xxx%2ferror.html

Can someone please guide me in what I'm doing wrong and possible solution?

Thanks
N

Re: [users@httpd] Apache not decoding %2f to / in URL

Posted by "plot.lost" <pl...@gmail.com>.
On 10/12/2011 12:02, Nico Nieuwoudt wrote:
>
> I have to use "%2f" in URL and not "/". Idea is to configure apache in 
> such manner to recognise and encode "%2f" to "/".
>
> Thx
>
> On Dec 10, 2011 1:36 AM, "Eric Covener" <covener@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     On Fri, Dec 9, 2011 at 6:18 PM, Nico Nieuwoudt
>     <nico.nieuwoudt@gmail.com <ma...@gmail.com>> wrote:
>     > Hi
>     >
>     > I've seen some topics regarding %2f ( URL encoded / ), but still
>     having
>     > problem after suggested solutions.
>     >
>     > I have the following entry in httpd.conf (Apache v2.2)
>     >
>     > <VirtualHost x.x.xx.xxx:80>
>     >     AcceptPathInfo On
>     >     AllowEncodedSlashes On
>     > </VirtualHost>
>     >
>     > and after passing an error page URL from httpd.conf, entry:
>     > ErrorPage http://x.x.xx.xxx%2ferror.html (which should be encoded as
>     > http://x.x.xx.xxx/error.html)
>     >
>     > I get the follwing from all browsers e.g
>     > Firefox can't find the server at x.x.xx.xxx%2ferror.html
>
>     Use an actual "/" where it's expected in the URL.
>
Are you getting any requests actually sent to your apache server - 
anything showing up in any of the logs?

As the error you are seeing is 'can't find server' rather than any page 
not found or bad request error etc, I would guess that the problem is 
the browsers are not recognizing that first %2f as the end of the domain 
part of the url, so they used the whole thing as the domain - which of 
course could not be found.

I would imagine you have to have http://x.x.xx.xxx/encoded%2furl%2fhere





Re: [users@httpd] Apache not decoding %2f to / in URL

Posted by Nico Nieuwoudt <ni...@gmail.com>.
I have to use "%2f" in URL and not "/". Idea is to configure apache in such
manner to recognise and encode "%2f" to "/".

Thx
On Dec 10, 2011 1:36 AM, "Eric Covener" <co...@gmail.com> wrote:

> On Fri, Dec 9, 2011 at 6:18 PM, Nico Nieuwoudt <ni...@gmail.com>
> wrote:
> > Hi
> >
> > I've seen some topics regarding %2f ( URL encoded / ), but still having
> > problem after suggested solutions.
> >
> > I have the following entry in httpd.conf (Apache v2.2)
> >
> > <VirtualHost x.x.xx.xxx:80>
> >     AcceptPathInfo On
> >     AllowEncodedSlashes On
> > </VirtualHost>
> >
> > and after passing an error page URL from httpd.conf, entry:
> > ErrorPage http://x.x.xx.xxx%2ferror.html (which should be encoded as
> > http://x.x.xx.xxx/error.html)
> >
> > I get the follwing from all browsers e.g
> > Firefox can't find the server at x.x.xx.xxx%2ferror.html
>
> Use an actual "/" where it's expected in the URL.
>
> ---------------------------------------------------------------------
> 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] Apache not decoding %2f to / in URL

Posted by Eric Covener <co...@gmail.com>.
On Fri, Dec 9, 2011 at 6:18 PM, Nico Nieuwoudt <ni...@gmail.com> wrote:
> Hi
>
> I've seen some topics regarding %2f ( URL encoded / ), but still having
> problem after suggested solutions.
>
> I have the following entry in httpd.conf (Apache v2.2)
>
> <VirtualHost x.x.xx.xxx:80>
>     AcceptPathInfo On
>     AllowEncodedSlashes On
> </VirtualHost>
>
> and after passing an error page URL from httpd.conf, entry:
> ErrorPage http://x.x.xx.xxx%2ferror.html (which should be encoded as
> http://x.x.xx.xxx/error.html)
>
> I get the follwing from all browsers e.g
> Firefox can't find the server at x.x.xx.xxx%2ferror.html

Use an actual "/" where it's expected in the URL.

---------------------------------------------------------------------
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