Avatar of savetheorcas
savetheorcas

asked on 

.htaccess mod-rewrite Windows Vista

I am trying to get mod-rewrite working on my LAMP installation on Windows Vista, but it's not working. Here is what I  have:

==========================
My .htaccess file
==========================
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]

==========================
My index.php file
=========================
<?php
echo 'Rewrite Working';
?>

==========================
My httpd Settings
==========================
DocumentRoot "C:/web"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.  
#
<Directory />
    Options Indexes Includes FollowSymLinks MultiViews
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/web">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes Includes FollowSymLinks MultiViews


    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

I have a sub-directory called EverettCourse under the document root, this is where both the .htaccess and index.php files exists.

When I go to http://localhost/EverettCourse/ the index.php page works fine. However, when I try something like http://localhost/EverettCourse/abc, I get the following error message

Not Found

The requested URL /index.php was not found on this server.

What am I doing wrong?
PHPApache Web Server

Avatar of undefined
Last Comment
Lordgobbledegook

8/22/2022 - Mon