I need to write simple Apache mod_rewrite statement, which redirect user urls to a script:
**http://mydomain.com/username -> http://mydomain.com/user.py?uname=username**
mydomain.com/username -> http://mydomain.com/user.py?uname
mydomain.com/username -> http://mydomain.com/user.py?uname
The following lines don’t work:
RewriteEngine on
RewriteRule ^[a-z]{5,}$ /user.py?username=$1 [L]
Looking forward for your help
Try:
This makes it so when someone requests
http://mydomain.com/username, they will get served the content athttp://mydomain.com/user.py?uname=username.