捕获所有的.htaccess - 只有当什么也没有发现之前有的、什么也没、发现、htaccess

由网友(曲终人散怎叹花谢花落°)分享简介:时有可能有例外,一个包罗万象的所有正则表达式中的.htaccess文件?Is it possible to have exceptions to a catch all regex in a .htaccess file ?下面是我目前的.htaccess文件Here is my current .htacces...

时有可能有例外,一个包罗万象的所有正则表达式中的.htaccess文件?

Is it possible to have exceptions to a catch all regex in a .htaccess file ?

下面是我目前的.htaccess文件

Here is my current .htaccess file

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ see.php?url=$1 [L]

我想有一些例外的捕获所有的正则表达式,并只使用它在后一种情况下,如果没有被发现之前

I would like to have some exceptions to the catch all regex and only use it in the last case, if nothing is found before.

我试着用的RewriteCond玩,但我没能完成这项工作。

I tried to play with RewriteCond, but I weren't able to make this work.

编辑:我想异常被rewrited为好,它本可以

I would like exceptions to be rewrited as well, it this possible ?

推荐答案

任何你在.htaccess文件将捕获所有的重写将首先执行之前。所以,如果你把一个[L]标志,对这些重写则处理停止那里的渔获全部重写,将不会触发。

Anything you place in the .htaccess file before the catch all rewrite will be executed first. So if you put an [L] flag on those rewrites then the processing stops there and the the catch all rewrite will not fire.

有意义吗?

阅读全文

相关推荐

最新文章