I believe to have narrowed down an bug I have found to the following.
Scenario:
1. Step: I have a virtual host ("my.lo", correctly set in the "C:\xampp\apache\conf\extra\httpd-vhosts.conf" file and set to 127.0.0.1 in the "hosts" file in "C:\Windows\System32\drivers\etc"). In the root directory for the virtual host ("my") I have a file called "temp .htaccess".
Starting apache in the xammp control panel I can call http://my.lo in my Firefox browser.
Stopping apache then.
2. Step: Having the file "temp .htaccess" renamed to ".htaccess", starting apache again and trying to call "my.lo" in my browser the browser shows the standard error message "Fehler: Server nicht gefunden" (Error: Server was not found"). It tries to load for some time when first trying to call it. Later calls nearly immeaditly show the error message in the browser.
Stopping apache.
3. Step: Changing back the name to "temp .htaccess". Starting apache. Trying to call "my.lo" in the browser still show the error message now.
Clearing browser cache and its local-storage is no help.
The ".htaccess" file is: (10 lines, first line has a single space and then \r\n, 7th line is empty and has only \r\n, 10th line is empty.)
- Code: Select all
RewriteEngine On
#Options FollowSymLinks
ErrorDocument 404 default
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
ErrorDocument 404 default
# ErrorDocument 404 /neuanlegen.php?aktion=DateiNichtVorhanden
Is it because of the .htaccess content? Or a bug in that xammp/apache version?
I know for sure that in former versions I had .htaccess files in the virtual host's root directory.
Is it a known bug?
[EDIT by Altrea: moved to the english section]