127.0.0.1/ex/main/items/bread
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^items/([^/]+)/?$ /ex/main/item.php?act=view&name=$1 [L]
Works fine
但是如何添加第二条规则?
127.0.0.1/ex/main/items/bread/123/ 处理输入和名称
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^items/([^/]+)/?$ /ex/main/item.php?act=view&name=$1&id=$???? [L]