mod_rewrite rule for ALL possible characters?

Hi there,

I'm using mod_rewrite via a .htaccess file, to redirect ie. "domain.com/username" to index.php?s=username.
This is working great with the following 2 lines:
Code:
RewriteEngine On
RewriteRule ^([-a-zA-Z0-9!^\~=_\ {}();+]*)$ index.php?s=$1 [L]
However, some usernames that contain any of the following chars, cannot be rewritten for some strange reason: * | : ] [
I'm getting a "Forbidden error" when I try (.*) in stead of the [-a-zA-Z...] and now I'm just stuck. I've googled my *** off without getting any results.

Is it even possible to rewrite these characters without having to adjust some httpd.conf settings?

Any leads or suggestions are greatly appreciated.
Thanks in advance!

 

 

 

 

Top