使用.php .html和无点(文件夹)的RegEx文件

时间:2010-12-17 15:55:10

标签: regex apache2

有人可以帮助我为Apache Mod Rewrite编写RegEx吗? 我想在和上选择所有.html和.php,并且所有没有点(文件夹)

  

RewriteCond%{REQUEST_URI}。(html | php)$

这就是我现在所拥有的,所以我需要添加“或者不包含任何内容”的内容。

:)

1 个答案:

答案 0 :(得分:1)

/.*(\.(html|php))?/

我认为可以在文件夹中选择php和html文件。祝你好运