htaccess重写子文件夹

问题描述:

我想重写两个虚拟子文件夹/ content/view /和/ content/section /。我现在有这样的:htaccess重写子文件夹

RewriteCond %{REQUEST_URI} ^htaccesstst/content/(view|section)+ 
RewriteRule ^$ http://www\.google\.nl [L,R=301] 

此重写/内容/内容/,/内容/视图/,/内容/节/,这是正确的。但是它也会重写/内容/(没有任何内容)。我不想要这个!帮帮我?

您可以将其替换为:

RewriteRule ^htaccesstst/content/(view|section)/?$ http://www.google.nl [L,R=301] 
+0

这并不做的伎俩:( – 2012-07-20 12:38:15