.htaccess 与数字1-15匹配的规则

.htaccess 与数字1-15匹配的规则,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,如果用户位于第1-15页,我将使用以下3条重写规则加载静态缓存文件。有没有办法把这些结合起来,特别是最后的2合1规则?我找不到任何方法来指定1-15的范围 RewriteRule ^$ app/webroot/cache_html/cache_static_popular_results_1.php [L] RewriteRule ^popular/page:([1-9])$ app/webroot/cache_html/cache_static_popular_results_$1.php [

如果用户位于第1-15页,我将使用以下3条重写规则加载静态缓存文件。有没有办法把这些结合起来,特别是最后的2合1规则?我找不到任何方法来指定1-15的范围

RewriteRule ^$ app/webroot/cache_html/cache_static_popular_results_1.php [L]
RewriteRule ^popular/page:([1-9])$ app/webroot/cache_html/cache_static_popular_results_$1.php [L]
RewriteRule ^popular/page:(10|11|12|13|14|15)$ app/webroot/cache_html/cache_static_popular_results_$1.php [L]
有没有办法把这些结合起来,特别是最后的2合1规则

怎么样

RewriteRule ^popular/page:([1-9]|1[0-5])$ app/webroot/cache_html/cache_static_popular_results_$1.php [L]

除此之外,OP不希望匹配
流行/页面:0
,因此单个数字范围应为
[1-9]
:-)