Mod_rewrite doesn't seem to be enabled


#1

Hey,

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:

[php]
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]

[/php]

I do have a file that is looking for mod_rewrite: http://jvgiveawayevent.com/modules.php

[php]<?php

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

/**

  • 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;
    }
    }

?>
[/php]

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

How can we get this enabled?


#2

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


#3

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


#4

Mod Rewrite works for me
Try to remove the lines