logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problem with mod_rewrite (?)
Author
yca



Joined: 18 Jan 2008
Posts: 2

PostPosted: Fri 18 Jan '08 18:01    Post subject: Problem with mod_rewrite (?) Reply with quote

In httpd.conf, I have the following:

Code:
<Directory "C:/Inetpub/wwwroot/tmp">
   RewriteEngine on
   RewriteRule ^(.+)$ /tmp2/hello.html
</Directory>


The following requests are being redirected properly:
http://usa.rota.lv/tmp/test
http://usa.rota.lv/tmp/test%21

But on this request:
http://usa.rota.lv/tmp/test%C0
i receive an error:
Quote:
Forbidden

You don't have permission to access /tmp/testÀ on this server.


Does Apache try to find this file on the disk first and treats the last character as unacceptable?
It it does, how to make it to run mod_rewrite first, instead?
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sat 19 Jan '08 18:54    Post subject: Reply with quote

Apache interprets the characters in a URI as UTF-8, regardless of the platform you are running on.

%C0 is an invalid UTF-8 character.

Try replacing /tmp/test%C0 with /tmp/test%C3%80, which is the valid UTF-8 representation of /tmp/testÀ.

Note that the "À" character will not look right in your log files because log files are not UTF-8.

-tom-
Back to top
yca



Joined: 18 Jan 2008
Posts: 2

PostPosted: Sun 20 Jan '08 23:25    Post subject: Reply with quote

Yes, it appears to accept only valid UTF-8 combinations.
Is it possible to bypass this restriction?


Besides that, Apache doesn't allow the following URLs:
http://usa.rota.lv/tmp/test%22
http://usa.rota.lv/tmp/test%2A
http://usa.rota.lv/tmp/test%2F
http://usa.rota.lv/tmp/test%3A
http://usa.rota.lv/tmp/test%3C
http://usa.rota.lv/tmp/test%3E
http://usa.rota.lv/tmp/test%3F
http://usa.rota.lv/tmp/test%5C
http://usa.rota.lv/tmp/test%7C

That is, Apache (only Windows version?) doesn't like the symbols "*/:<>?\|
Is there any way to make it accept them?
Back to top


Reply to topic   Topic: Problem with mod_rewrite (?) View previous topic :: View next topic
Post new topic   Forum Index -> Apache