转到:http://localhost:3000/rr/uu 用:
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?param=$1¶m2=$2
作品。
只添加一个参数:
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ index.php?param=$1¶m2=$2¶m3=$3
然后去:
http://localhost:3000/rr/uu/gg
导致Not Found apache错误消息。为什么?
答案 0 :(得分:1)
Your rule needs 3 capture groups, try :
RewriteRule ^([^/]+)/?(.*)/?(.*)/?$ /index.php?perm=$1&perm2=$1&perm3=$3 [L]