mod_rewrite具有不同结果的多个语句

Trying to write a .htaccess file and wanting to fulfill the following conditions:

  • /$1/ will do index.php?page=$1
  • /users/$1 will do index.php?page=users&id=$1 (where $1 is a number)

So I thought the following would work:

RewriteRule ^([^/.]+)/?$ index.php?page=$1 [L]
RewriteRule ^users/([0-9]+)/?$ index.php?page=users&id=$1 [L]

However, it just seems to only do the first and I can't the second statement to work

It would appear that it conflicts with HTML5 push stating, even though usually the url could be requested despite being a permalink the html5 push state is somehow overriding it (even though it shouldn't!)

Well so when I have done these I start mine with /

RewriteRule ^/([^\/]+)/?$ index.php?page=$1 [L]
RewriteRule ^/users/([0-9]+)/?$ index.php?page=users&id=$1 [L]