我正在尝试设置一个重写,它将获取新闻文件夹中的任何页面(除index.shtml和template.shtml(其中template.shtml将在其中获取变量消息) 。它)其他所有的页面应该重写template.shtml新闻=(名称相同新闻/名)Apache Rewrite Directory with Exceptions
我至今是:?
RewriteCond %{REQUEST_URI} !^/news/((index|template).shtml)?$
RewriteRule ^news/(.*) /news/template.shtml?news=$1
这似乎排除了主/新闻/,但不是template.shtml,并且重写似乎循环。
我该如何解决这个问题? Ÿ帮助将不胜感激。
谢谢。
谢谢,但似乎没有工作。也许是因为我把它放在另一个目录中?试过: – fanfavorite
忽略最后一条消息,这是因为template.shtml与查询字符串不会被省略。试图找出解决方案。 – fanfavorite
再次无视。 template.shtml脚本在导致重写循环的目录内拉入另一页。谢谢。 – fanfavorite