0

我有以下重写规则:

RewriteRule ^section/(.*)/(.*)_(.*).html$ index.php?section_permalink=$1&content_permalink=$2&content_id=$3 [QSA,L]
RewriteRule ^section/(.*)/page_(.*)/$ index.php?section_permalink=$1&page=$2 [QSA,L]
RewriteRule ^section/(.*)/$ index.php?section_permalink=$1 [QSA,L]

我想修改它们以摆脱 /section/.

我怎样才能做到这一点?

谢谢!

4

1 回答 1

1
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule ^(.*)/(.*)_(.*).html$ index.php?section_permalink=$1&content_permalink=$2&content_id=$3 [QSA,L]
RewriteRule ^(.*)/page_(.*)/$ index.php?section_permalink=$1&page=$2 [QSA,L]
RewriteRule ^(.*)/$ index.php?section_permalink=$1 [QSA,L]
于 2012-12-07T16:39:12.540 回答