Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '12 at 22:41
up vote 4 down vote accepted
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ...
share|improve this answer

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

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.