0

This is a common gripe of mine.

I was curious if there is a cheap test to know if mod_rewrite is on?

Is there a directive that i can add to the htaccess file to determine if mod_rewrite is on?

1
  • 1
    Do you need to see if mod_rewrite is installed on the server or if it's enabled (as in RewriteEngine is set to ON) ?
    – tftd
    Feb 17, 2012 at 22:41

2 Answers 2

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

I wanted to expand on the previous answer:

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

If rewrite is on it'll log any rewrites that one may have. But it should be turned off as it is expensive on the server and wouldn't be ideal for a heavy production server.

Also, i can run: httpd -t -D DUMP_MODULES to see what modules are running for apache.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .