Why is it not working?
I joke. Here's the info:
In the folder C:\host\www\test, I have an .htaccess file. Inside that .htaccess file is the following:
-
RewriteEngine On
-
RewriteRule ^test1.php$ /test2.php [R]
-
If I then go to the url htxp://localhost/test/test1.php, I am redirected to htxp://localhost/test2.php - I thought that this would redirect me to htxp://localhost/test/test2.php? Clearly not. If I removed the forward slash before the 'test2.php', I am redirected to htxp://localhost/C:/host/www/l/test2.php
I am running EasyPHP 3.
Here's the httpd.conf info that I think relates to this problem:
-
#
-
# DocumentRoot: The directory out of which you will serve your
-
# documents. By default, all requests are taken from this directory, but
-
# symbolic links and aliases may be used to point to other locations.
-
#
-
DocumentRoot "${path}/www"
-
-
#
-
# 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 FollowSymLinks
-
AllowOverride none
-
Order allow,deny
-
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 "${path}/www">
-
#
-
# 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 FollowSymLinks
-
-
#
-
# 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>