0
http://be.ac/index.php?category=all&providers=all&keyword=cookies&page=1
我想重寫這樣的網址:
http://be.ac/category/all/providers/all/keyword:cookies/page:1
這是我的htaccess
RewriteEngine on
RewriteRule ^page:([^/]*)/?$ index.php?page=$1 [QSA,L]
RewriteRule ^category/([^/]*)/?$ index.php?category=$1 [QSA,L]
RewriteRule ^category/([^/]*)/page:([^/]*)/? index.php?category=$1&page=$2 [QSA,L]
RewriteRule ^category/([^/]*)/providers/([^/]*)/page:([^/]*)? index.php?category=$1&providers=$2&page=$3 [QSA,L]
RewriteRule ^category/([^/]*)/providers/([^/]*)/keyword:([^/]*)/page:([^/]*)? index.php?category=$1&providers=$2&keyword=$3&page=$4 [QSA,L]
這是行不通的,我需要的是接受像這樣的網址:
http://be.ac/category/all/providers/all/keyword:cookies/page:1
http://be.ac/category/all/providers/all/page:1
http://be.ac/category/all/page:1
http://be.ac/page:1
http://be.ac/keyword:cookies
有什麼想法?