.htaccesswindows-7wampexpressionengine

Unable to Remove index.php on ExpressionEngine WAMP Installation


I have WAMP v2.2 installed on my Windows 7 machine, with virtual hosts enabled.

I've successfully installed ExpressionEngine for one of my local sites, and everything works great except when I try to remove index.php from the URL using the approved .htaccess method. I still get a 404 error if index.php is not present, but the page displays fine with index.php in the URL.

I made sure the rewrite module was checked in the Apache menu:
the rewrite module was checked in the Apache menu. I've successfully used this method dozens of times on commercial hosts, so I'm stumped.

Update for pvledoux:

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Removes index.php
  RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php/$1 [L]

  # If 404s, "No Input File" or every URL returns the same thing
  # make it /index.php?/$1 above (add the question mark)
</IfModule>

Note: I tried adding the ? into the rule, but it didn't work.

The site is at the root of the Virtual Host.


Solution

  • Got It!

    I needed to add AllowOverride in httpd-vhosts.conf:

    <Directory "C:\Site\Root\Path">
        AllowOverride All
        Order Deny,Allow  
        Allow from all
    </Directory>
    

    A gagillion thanks and a 6-pack of beer goes to @parhamr for helping me out of this pickle.