2012-12-06 33 views
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] 

我想对它们进行修改,以摆脱/节/的。

我该怎么做?

谢谢!

+0

你是什么意思的“摆脱/部分/”?你想让它脱离规则吗?你想从浏览器的URL地址栏中找到它吗? –

+0

我想从规则中删除它,当然还有从浏览器的URL地址栏中删除它。 – Psyche

回答

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]