I am new to the URL rewrite rules and would like to rewrite some URLs. Below is my problem:
I have created two rules (which works fine) that will hide the *.php extension from the URL. One is to redirect “/abc.php” to “/abc”. Another rule is to Rewrite /abc as /abc.php. These two rules work fine and I use the following pattern.
^([^/]+)/?\.php$–> Redirects to –>{R:1}^([^/]+)/?$–> Rewrites to –>{R:1}.php
Now I have a problem. I have a page which goes like www.example.com/member?getuser=chris (note that it’s not member.php?getuser=chrisyeung because of the previous rules). I want to rewrite the URL to:
www.example.com/member/chris
I tried to follow some tutorials and use the following pattern:
`^/member/(_[0-0a-z-]+)` --> Rewrites to --> `^member?getuser={R:1}`.
…but it doesn’t work.
What am I missing?


I don’t unterstand your first two rules. Rewrite
*.phpto*and*to*.php– sounds like a loop for me. I assume your files are named.phpand you want your visitors use URLs w/o this file extension. Then just rewrite*to*.php.For your members pages, use:
I changes the list of valid characters inside the
[]and I callmember.phpdirectly – no need for issuing another rule.QSAis for passing through further URL params.