Hello. WampServer Version 2.0 is installed on my computer in the D:\wamp\www
folder. Its content is launched at http://localhost/
, but only if the folder does not contain an .htaccess
file with the following content:
<!-- Кастомная страница 404 --> ErrorDocument 404 /404.html <!-- Конец кастомной страницы 404 --> <!-- Скрытие расширений .html --> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html <!-- Конец скрытия расширений .html --> <!-- Переадресация index.html на заглавную --> RewriteEngine On RewriteCond %{THE_REQUEST} ^[AZ]{3,9}\ /index\.html\ HTTP/ RewriteRule ^index\.html$ http://Kristinita.imtqy.com/ [R=301,L] <!-- Конец переадресации index.html на заглавную -->
It performs its functions on the site, but if you put the .htaccess
file in D:\wamp\www
, when opening any page via the WAMP Server, the error 500 Internal Server Error
will D:\wamp\www
instead of the contents of the page in the browser:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
On the Internet, it is advised to remove the octotorp in the line of the httpd.conf
file - #LoadModule rewrite_module modules/mod_rewrite.so
or with the left mouse button on Aestan Tray Menu → Apache → Apache modules → checkbox on rewrite_module
, which is essentially the same. Several times did → Restart all services → error 500 did not disappear anywhere.
What needs to be done for the correct interaction of WampServer with .htaccess
? Thank.