我想写我的 .htaccess 文件,所以我有这部分
(例如:http ://www.mysite.com/tutorial/php/bydate/p7 )
RewriteRule ^(album|tutorial)/(.*)/(bydate|byuser|byrate|bypost)/(asc|desc)/p([0-9]+)$ $1.php?cat=$2&sort=$3&order=$4&p=$5 [QSA]
RewriteRule ^(album|tutorial)/(.*)/(bydate|byuser|byrate|bypost)/(asc|desc)/$ $1.php?cat=$2&sort=$3&order=$4 [QSA]
RewriteRule ^(album|tutorial)/(.*)/(bydate|byuser|byrate|bypost)/p([0-9]+)$ $1.php?cat=$2&sort=$3&p=$4 [QSA]
RewriteRule ^(album|tutorial)/(.*)/(bydate|byuser|byrate|bypost)/$ $1.php?cat=$2&sort=$3 [QSA]
RewriteRule ^(album|tutorial)/(.*)/(asc|desc)/p([0-9]+)$ $1.php?cat=$2&order=$3&p=$4 [QSA]
RewriteRule ^(album|tutorial)/(.*)/(asc|desc)/$ $1.php?cat=$2&order=$3 [QSA]
RewriteRule ^(album|tutorial)/(.*)/p([0-9]+)$ $1.php?cat=$2&p=$3 [QSA]
RewriteRule ^(album|tutorial)/(.*)/$ $1.php?cat=$2 [QSA]
我的问题是:
1-使用它更好吗?或者就足够了
RewriteRule ^(album|tutorial)/(.*)/$ $1.php?cat=$2 [QSA]
(例如:http://www.mysite/tutorial/php/?sort=bydate&order=desc&p=2)
我对待我的php文件中的参数?
2-如果我想使用第一部分,有什么方法可以简化它吗?