Chinaunix首页 | 论坛 | 博客
  • 博客访问: 178567
  • 博文数量: 36
  • 博客积分: 2059
  • 博客等级: 上尉
  • 技术积分: 355
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-08 09:15
文章分类

全部博文(36)

文章存档

2012年(9)

2011年(10)

2010年(17)

分类:

2011-02-28 16:43:26

Ref:
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

Now this rule is applied if the pattern of the RewriteRule matches the current request URL (per-directory path stripped before) and if the condition is fulfilled.

In this case the condition is only true if when mapping the request URL to the filesystem it matches either an existing file with the file size greater than 0 (-s), or a symbolic link (-l) or a directory (d). So your rule will be applied for any URL (^.*$ matches anything) that can be mapped to something existing in your filesystem. The substitution - just means to not change anything. And the NC (no case, case insensitive, useless in this context) and L (last rule if applied) are flags that modify either the pattern, replacement or the execution of the rule.

阅读(2017) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~