any .htaccess file gives 500 error how to solve?

0

Does any .htaccess file give 500 error how to resolve?

Whenever I put a .htpaccess file it always gives error this is the code

<IfModule mod_rewrite.c>
   RewriteEngine on
   # Redirect to domain with www.
   RewriteCond %{HTTPS} off
   RewriteCond %{HTTP_HOST} !^www\. [NC]
   RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
   # Same for HTTPS:
   RewriteCond %{HTTPS} on
   RewriteCond %{HTTP_HOST} !^www\. [NC]
   RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

Here you talk about the httpd.conf file but my file is empty

Error 500 page access using CheckSpelling in htaccess It looks exactly the same as an example I found here.

I reinstalled Apache2 until I re-installed the server and nothing continues with error 500

root@host:~# a2enmod rewrite
Module rewrite already enabled

Operating System: Ubuntu Linux 12.04.5

I added it as it says here Error on server 500 after installing Laravel :

RewriteBase /

It did not work. I tried to put a .htaccess file and it also gives error.

What should I do?

    
asked by anonymous 04.03.2016 / 01:38

1 answer

0

I solved reinstalling apache and the error disappeared.

    
07.03.2016 / 11:48