RewriteRule ^photographs/?$ photographs.php [L]
RewriteRule ^photographs/(.*)/?$ photographs.php?cat=$1 [L,QSA]
RewriteRule ^photographs/(.*)/(.*)/?$ photographs.php?cat=$1&page=$2 [L,QSA]
我需要这个选项,例如
由于
答案 0 :(得分:1)
RewriteRule ^photographs/?$ index.php [L]
RewriteRule ^photographs/([^/]+)/?$ index.php?cat=$1 [L,QSA]
RewriteRule ^photographs/([^/]+)/([^/]+)/?$ index.php?cat=$1&page=$2 [L,QSA]
那是因为(.*)
也匹配/
个字符。