any . htaccess file gives error 500 how to resolve?

Asked

Viewed 392 times

0

any file . htaccess gives error 500 how to solve?

Whenever I put a file . htpaccess 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>

This is the httpd.conf file, but my file is empty

Error 500 while accessing page using Checkspelling in htaccess It’s 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 as it is said here Server 500 error after Laravel installation:

RewriteBase /

It didn’t work. I tried to put a file . htaccess and also gives error.

What should I do?

  • Normally the error information is saved in the server log. Check the apache log and you can know more precisely what the error is about.

1 answer

0


I decided to reinstalled apache and the error disappeared.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.