I’m using this tester for url mod_rewrite test:
http://martinmelin.se/rewrite-rule-tester/
When I write something like this:
RewriteRule ^x/([a-z]+)/([0-9]+)/$ x.php?x=$2
Even though I have entered url :
x/p/6/
It get renamed to
x.php?x=p
and. What I want is
x.php?x=6
I’m new with mod rewrite, so anything would be useful.
I’m not a pro in mod_rewrite myself, but I think there is something wrong with that tool.
for example, if you change
x.php?x=$2tox.php?$1=$2,$2will be parsed correctly.And then, CMIIW but the regex looks fine. Test the regex here or here.
And Have you ever actually tried the RewriteRule yourself?