I have an Amazon EC2 (amzn-ami-pv-2013.09.0.x86_64-ebs (ami-149f7863)) on which I installed Apache, PHP and MySQL.
All works fine until I try to activate .htaccess.
I change AllOverride All in http.conf and restart the Apache service.
When I add the .htaccess file I receive a 500 Internal Server Error even if the htaccess is void.
mod_rewrite.so module is loaded
If I delete the htaccess all works fine.
What I'm doing wrong?
--EDITED--
This is the .htaccess content
RewriteEngine On Options +FollowSymlinks RewriteBase / RewriteCond %{HTTP_HOST} ^mywebsite.com RewriteRule (.*) http://www.mywebsite.com/$1 [R=301,L] But even if I left the htaccess file whitout content it returns a 500 error.
The virtualhost definition is the following:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/mywebsite.com ServerName mywebsite.com </VirtualHost> --EDITED-2-
I'm sorry but I sorted out this issue only creating the .htaccess file from command line. Now it works. Thank you really for helping me.
--END-EDITING--
Thanks