htaccess通配符仅匹配数值

I use this:

RewriteRule ^(page-a[^/]+)/?$ /page.php?a=$1

the objective is to rewrite to pages like this:

http://www.website.com/page-a47643

now how can i match only strings containing NUMBERS following "page-a" ?

The problem is that the htaccess will mess up access to folder like this:

http://www.website.com/page-about-me/

Change your regex to:

RewriteRule ^(page-a[0-9]+)/?$ /page.php?a=$1 [L,QSA]

[0-9]+ will match 1 or numbers and will leave /page-about-me/ as is.

RewriteRule ^(page-a[0-9]+)/?$ /page.php?a=$1
RewriteRule ^(page-a\d+)/?$ /page.php?a=$1

\d in Perl-compatible regular expressions (PCRE, as used by Apache) means "one digit". \d+ means "one or more digits".

RewriteRule ^page-a([0-9]+)/?$ /page.php?a=$1 [L,QSA]