0
我有以下url需要重寫.htaccess 例如,我要使用網站的新聞部分。.htaccess重寫將不起作用或被覆蓋
www.example.com/news/ -works
www.example.com/news/latest/ -works
www.example.com/news/1/this-is-news -does not work
這是我當前用於「新聞」部分的.htaccess的一部分。
RewriteRule ^news/? index.php?view=news [L]
RewriteRule ^news/([^/\.]+)/([0-9]+)/?$ index.php?view=news&task=$1&page=$2 [L]
RewriteRule ^news/([0-9]+)/?$ index.php?view=news&id=$1 [L]
thx,這工作 – rokkz