廉价的testing,以确定如果mod_rewrite在htaccess中?

这是我的一个普遍的抱怨。

我很好奇,如果有一个廉价的testing,知道是否mod_rewrite?

是否有一个指令,我可以添加到htaccess文件,以确定是否mod_rewrite上?

<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ... </IfModule> 

我想扩大以前的答案:

 <IfModule mod_rewrite.c> RewriteEngine On RewriteLog "/absolute/path/to/your/wwwroot/public_html/rewrite.log" RewriteLogLevel 5 </IfModule> 

如果重写,它会logging任何可能有的重写。 但它应该被closures,因为它在服务器上是昂贵的,并不适合大量生产服务器。

另外,我可以运行: httpd -t -D DUMP_MODULES查看运行Apache的模块。