Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Location
    Bay Area -USA
    Posts
    1,738

    can mod_rewrite run without "RewriteEngine On"

    Hey I want to know if there is any case in which the .htaccess file would not require you to add
    "RewriteEngine On"

    I ask because im trying to detect if its being used already by the following code:
    PHP Code:
    $filec ".htaccess";
    if(
    stristr($filec"RewriteEngine On") != false){ 
    //being used

    I want to know if that's enough checking or if I should do more than just that... thanks!!!
    Last edited by VolkNet; 06-22-2005 at 05:05 PM.
    <<< Please see Forum Guidelines for signature setup. >>>

  2. #2
    Join Date
    Jun 2004
    Location
    Bay Area -USA
    Posts
    1,738
    Opps Edit:

    should be:
    $filec = @file_get_contents(".htaccess");
    <<< Please see Forum Guidelines for signature setup. >>>

  3. #3
    Join Date
    Feb 2003
    Location
    Connecticut
    Posts
    5,441
    Never tried this, but:
    PHP Code:
    <?php
         $mods 
    apache_get_modules();
         if(
    in_array('mod_rewrite',$mods))
         {
              
    # being used
         
    }
    ?>
    That should make sure that mod_rewrite is loaded, and your code should take care of the rest.

  4. #4
    Join Date
    Jun 2004
    Location
    Bay Area -USA
    Posts
    1,738
    wow! Thank you very much! :-D
    <<< Please see Forum Guidelines for signature setup. >>>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •