【发布时间】:2009-08-21 21:17:09
【问题描述】:
我在表达式引擎 CMS 中工作,我有一些重写代码来从 URL 中删除 index.php,但在我的某些 URL 上,我想删除文件名之前的目录 /site/。
就像我有/site/pennsylvania_attorneys.html
我想删除站点部分并让它阅读/pennsylvania_attorneys.html
我现在拥有的当前mod重写代码是:
RewriteEngine on
RewriteCond $1 !^(images|css|themes|tools|admin|inc|js|cgi-bin|swf|themes|pennsylvania_attorneys_tpl\.html|license\.txt|attorney-tpl\.html|favicon\.ico|robots\.txt|index\.php) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
有什么想法吗?
【问题讨论】:
标签: url mod-rewrite