how to allow access in .htaccess file [duplicate]

0

My ".htaccess" looks like this:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f 

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{HTTP_HOST} !^$

RewriteCond %{HTTP_HOST} !^www\. [NC]

RewriteCond %{HTTPS}s ^on(s)|

RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

it is in the main directory, if I delete this file the site works in localhost, but without formatting and without features, with .htaccess the message appears:

  

Internal Server Error

     

Server encountered an internal or erroneous error and could not complete your   request.

     

Contact your server administrator at admin @ localhost   to inform them of the time this error occurred, and the actions that you   executed immediately before this error.

     

More information about this error may be available in the error log   from the server.

Does anyone know how to solve it?

    
asked by anonymous 26.08.2016 / 00:50

1 answer

0

Make sure apache mod_rewrite is enabled, you can enable it via terminal on linux:

a2enmod rewrite

or (on windows) via the apache httpd.conf file that contains the modules, just uncomment the line with the module:

#LoadModulo rewrite_modulo modulos/mod_rewrite.so

Do not forget to restart the apache service for the changes to take effect.

    
26.08.2016 / 13:43