httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ViNiL <vi...@zagamma.cz>
Subject [users@httpd] Rewrite rule for URL containing spaces
Date Thu, 04 Sep 2008 12:54:33 GMT
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


Mime
View raw message