I am running XAMPP for Windows 5.6.11. I have the following PHP file:
C:\xampp\htdocs\www.johndoe.com\index.php
which I am accessing as
http://localhost/www.johndoe.com/
As a matter of fact I need to access the following page:
http://localhost/www.johndoe.com/?value=about
as either of the following two:
http://localhost/www.johndoe.com/about/
http://localhost/www.johndoe.com/about
so I have the following in my .htaccess file:
RewriteEngine on
RewriteRule ^www\.johndoe\.com/about/?$ www.johndoe.com/?value=about
However, this is not working, as accessing the former sites gives me a 401 (not found).
Here is what I have in C:\xampp\apache\conf\httpd.conf
:
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
What must I do to get my .htaccess
file to be parsed and carry out the substitution I'm after?
I have tried placing the following in C:\xampp\apache\conf\httpd.conf
:
<Directory />
AllowOverride all
Require all allowed
</Directory>
but have had no luck with it.
I have even tried changing my .htaccess
file to the following:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /www.johndoe.com/
RewriteRule ^about/?$ ?value=about
but I'm still getting the 404 not found error message.