You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Aaron Franco <aa...@ngrinder.com> on 2011/06/22 04:13:56 UTC

[users@httpd] problem with mod_rewrite and htaccess on Windows 7

Hello,

 

I have WampServer up and running on my Windows 7 machine. It is installed in
C:/wamp. I have set up my configuration using the following VirtualHosts in
the C:/wamp/bin/apache/Apache2.2.1.7/conf/extras/httpd-vhosts

 

#

# Virtual Hosts

#

# If you want to maintain multiple domains/hostnames on your

# machine you can setup VirtualHost containers for them. Most configurations

# use only name-based virtual hosts so the server doesn't need to worry
about

# IP addresses. This is indicated by the asterisks in the directives below.

#

# Please see the documentation at 

# <URL:http://httpd.apache.org/docs/2.2/vhosts/>

# for further details before you try to setup virtual hosts.

#

# You may use the command line option '-S' to verify your virtual host

# configuration.

 

#

# Use name-based virtual hosting.

#

NameVirtualHost *:80

 

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for all requests that do not

# match a ServerName or ServerAlias in any <VirtualHost> block.

#

NameVirtualHost *:80

 

<VirtualHost *:80>

                ServerName localhost

                ServerAlias localhost

                DocumentRoot "C:/wamp/www"

                <Directory "C:/wamp/www">

                                Options Indexes Includes FollowSymLinks
ExecCGI MultiViews

                                AllowOverride all

                                Order Allow,Deny

                                Allow from all

                </Directory>

</VirtualHost>

 

 

<VirtualHost *:80>

                DocumentRoot
"C:/wamp/www/DevelopmentServer/clickslide/webroot"

                ServerName clickslide.loc

                <Directory
"C:/wamp/www/DevelopmentServer/clickslide/webroot">

                                Options Indexes Includes FollowSymLinks
ExecCGI MultiViews

                                AllowOverride all

                                Order Allow,Deny

                                Allow from all

                </Directory>

                DirectoryIndex     index.html index.php

    AccessFileName     .htaccess

                AddType application/x-httpd-php .php

    AddType application/x-httpd-php .php3

</VirtualHost>

 

My server starts and stops fine, and serves HTML files and PHP files just
fine but it ignores my .htaccess directives. I have MAMP with Apache set up
on my Macintosh and the htaccess works fine. With that said I think I'm
missing something obvious on Windows. 

 

Here are the contents of my htaccess

 

RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

 

I have even tried adding some Garbage to that which does not cause a server
error so I know the htaccess is not being read.

 

 

Please let me know if you need more information.  Please Help! J

 

Regards,

Aaron