You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ViNiL <vi...@zagamma.cz> on 2008/09/04 14:54:33 UTC
[users@httpd] Rewrite rule for URL containing spaces
Hello,
in Apache 1.3, we use rewrite rules like this one:
RewriteRule ^/website1(.*)$ /portal/page/portal/website1/$1 [PT]
The problem is, it does not work when there is more than one space in
URL (fe.: website1/subpage 1/subpage 2). The result is http error 413.
I guess, it is related to PT flag and escaping URI.
RewriteRule's flag B would probably do the trick, but it is available in
Apache 2.2 only.
We have tried following, as well:
RewriteMap escapemap int:escape
RewriteRule ^/website1(.*)$ /portal/page/portal/website1/${escapemap:$1}
[PT]
That works for any number of spaces! On the other hand side, it does not
work for Czech (accented; URI escaped) characters any more. :-(
Any hints?
Thank you!
--
ViNiL
Please don't eat me! I have a wife and kids. Eat them!
-- Homer J. Simpson meeting aliens