Mod_rewrite doesn't seem to be enabled


I’m trying to install a script that requires mod_rewrite however it keeps failing as it says it’s not installed.

My .htaccess looks like this:

RewriteEngine on
RewriteRule ^alice.html$ index.php?checkformodrewrite=1 [NC,L]
RewriteRule ^go/([0-9]+)/([A-Za-z0-9]+)$ go.php?var1=$1&var2=$2 [NC]
RewriteRule ^go/([0-9]+)$ go.php?var1=$1&var2=$2 [NC]


I do have a file that is looking for mod_rewrite:


if (is_mod_rewrite_enabled()) {
print “The apache module mod_rewrite is enabled.
} else {
print “The apache module mod_rewrite is NOT enabled.


  • Verifies if the mod_rewrite module is enabled
  • @return boolean True if the module is enabled.
    function is_mod_rewrite_enabled() {
    if ($_SERVER[‘HTTP_MOD_REWRITE’] == ‘On’) {
    return TRUE;
    } else {
    return FALSE;


When I run that it says: “The apache module mod_rewrite is NOT enabled.”

How can we get this enabled?

Are you on shared hosting, VPS, or dedicated hosting?

Shared, when I talked to sales they said mod_rewrite would be enabled.

Mod Rewrite works for me
Try to remove the lines