PDA

View Full Version : .htaccess issue with mod_rewrite


GeoS
07-07-2007, 01:30 PM
Im trying to solve an issue with next future of Pixelpost.

As some time ago few of you gave example of special chars in URL as solution for extending tags content then Im trying to figure it out.

All works perfect when Im not using mod_rewrite:
http://blog.piotrgalas.com/?x=browse&tag=Z%C5%82ote_Tarasy

But when Im trying to play with mod_rewrite Ive got small problem:
http://blog.piotrgalas.com/browse/tag/Z%C5%82ote_Tarasy/

There is some issue with Apache's mod_rewrite when it have to move encoded (%xx) chars to the rule.
At my place there is i.e.:
RewriteRule ^browse/tag/([a-zA-Z\ 0-9_-\%]+)/([0-9]+)([/]{0,1}.*)$ index.php?x=browse&pagenum=$2&tag=$1&test [NE,L]
and there is no difference if there is with NE or without.

Does anyone had same problem and found solution?

jaywilliams
07-07-2007, 03:19 PM
From what I have experienced, some browsers and/or servers don't like Unicode URLs. My advice is that you use only "Clean URLs". [A-Za-z0-9_-]

GeoS
07-07-2007, 04:30 PM
From this what I found there is some issue with some %xx marks and mod_rewrite. It can support it as it should and that is why it doesnt work.

As I know there can be some issues with it in first version of this feature in Pixelpost there was limitation only to alphachars with _- and space. Now I was trying to extend it and it works but without mod_rewrite support :/