A
A
Alexander Shapoval2017-06-05 07:04:37
Apache HTTP Server
Alexander Shapoval, 2017-06-05 07:04:37

Why is RewriteEngine not working?

Good day. The following code does not work for me in .htaccess

RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php

Shows an error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.18 (Ubuntu) Server at zadanie.loc Port 80

I installed apache2.4 on Linux, which had such problems, before that I had apache2.2 on Windows, everything worked

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Shapoval, 2017-06-05
@sanek_os9

The rewrite module was not installed, figured out,
enable the required module:
# a2enmod rewrite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question