I'm running Windows 7 64-bit. I have UAC fully enabled & 'XAMPP Control Panel' is set to always 'Run As Administrator'.
I have a firewall but am certain that it is not causing my problems (no connection requests are popping up and the apache/mysql processes are NOT being blocked).
XAMPP works properly under normal conditions & I've been using it for a while (I always do clean installs with updates).
In the XAMPP security section, I have set a 'root' password AND a username/password to protect the XMAPP directory.
I have been having a problems trying to get apache to use an '.htaccess' within the directory of a website.
The error I'm getting is "Error 500".
If I erase everything from the '.htaccess' file within the WEBSITE'S directory (not the one in 'C:/XAMPP/htdocs/xampp/', but the one in 'C:/XAMPP/htdocs/xampp/website/' directory), the index page will load.
If I add ANYTHING (even something like 'RewriteEngine On'), it will once again display 'Error 500'.
I went to my 'C:\XAMPP\apache\conf\httpd.conf' file and made sure to change 'AllowOverride' from 'None' to 'All' & restarted Apache but that did not help. Beyond that, this 'httpd.conf' file has default settings (from XAMPP installation).
In my 'C:\XAMPP\htdocs\xampp\' directory is a '.htaccess' file with the following:
- Code: Select all
AuthName "xampp user"
AuthType Basic
AuthUserFile 'C:\XAMPP\security\xampp.users'
require valid-user
I tried adding this to the '.htaccess' file inside 'C:\XAMPP\htdocs\xampp\website', but it once again gave me an error (even when this code was the only code in the file).
I also tried setting up a virtual host as per these instructions: http://sawmac.com/xampp/virtualhosts/
I could not get the virtual host to work either, kept getting "Object Not Found", so I do not know if it would have fixed the '.htaccess' problem or not.
Here are the 3 different versions of '.htaccess' that I've tried to use. All of them cause "Error 500".
Version 1:
- Code: Select all
RewriteEngine on
RewriteOptions MaxRedirects=1
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule .* - [L]
RewriteRule ^(.*)$ /profile.php/$1 [QSA,L]
Version 2:
- Code: Select all
RewriteEngine On
RewriteCond? %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^([a-zA-Z0-9_-]+)$ /profile/profile.php?username=$1
Version 3:
- Code: Select all
# 1 Establish a custom 404 File not Found page
ErrorDocument 404 /404.php
# 2 Prevent directory file listing in all of your folders
IndexIgnore *
# 3 Make pages render without their extension
Options +MultiViews
Problem is really giving me a headache. Hope giving this information will help you to help me. Thanks for reading.