我在.htaccess文件中有以下配置:
Options -Multiviews -Indexes +FollowSymLinks
RewriteEngine on
RewriteBase /coaster/CoasterInsider/
RewriteRule searchResults/keyword/(.*)/?$ index.php?page=searchResults&keyword=$1 [L,NC]
RewriteRule searchResults/keyword/(.*)/start/(.*)/?$ index.php?page=searchResults&keyword=$1&start=$2 [L,NC]
但start=$2
不匹配。例:
网址是:localhost/coaster/CoasterInsider/searchResults/keyword/a/start/3/
但是当我尝试echo $_GET['keyword']
打印a/start/3/
并且开始时没有获得任何价值。
答案 0 :(得分:1)
请尝试颠倒最后两条规则的顺序。