Forum Moderators: phranque

Message Too Old, No Replies

Apache mod rewrite and UTF-8 urlencode

can't get the mod rewrite to work

         

le_gber

3:04 pm on Jul 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all,

I use php urlencode to transform accentuated letters into their URF-8 equivalent.

I also use mod_rewrite to rewrite url's to make them search engine friendly.

My php urlencode is used to create links that should get rewritten in PHP but I get a 404 error when I try to link to a page.

Here's my RewriteRule:

RewriteRule ^([-a-zA-Z0-9\+\%]+)\/$ /regions.php?reg=$1 [L]

I added the \+ and \% because of the urlencode output of space and accentuated letters - ex: é = %C3%A9

Am I missing anything obvious?

It works for all the 'regions' that do not have an accentuated letter but not for the ones that do.