I uploaded the .htaccess to the server and received an Error 500 (Internal Server Error).
And in the error log I had the following error:
.../.htaccess: RewriteEngine not allowed here
But mod_rewrite.so
is enabled.
So, do I need to change
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
to
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
in the /etc/httpd/conf/httpd.conf file?
Or could it be something else? The .htaccess file should be okay, because it works perfectly fine on my localhost. I just don't want to screw anything up.
Here's part of my .htaccess file:
Options All -Indexes
Options +FollowSymLinks
RewriteEngine On
you could use something like this in your .htaccess file:
this code simply means, that anything not pointing to index.php or html or test should be directed to index.php!
Hope this is helpful!
I was getting this type of error from the Google Cloud instance after checking the logs from the
/var/log/apache2/error.log
To get rid of the above error & 500 Internal Server Error, follow these simple steps
Then add these snippets of lines
After you’ve made that change, make sure to restart the server:
This worked for me in getting rid of 500 Internal Server Error hosted on Google Cloud instance
In httpd version 2.4 (2.4.3 and 2.4.4), take a look at /etc/httpd/conf.d/wordpress.conf There is one entry for: ....
Change: "AllowOverride Options" to "AllowOverride All"
in wordpress.conf also in addition to changing httpd.conf. Restart the http server before the changes will take effect.
minimum configuration for your .htaccess to work:
allowing all configuration will work as well:
Let's say your DOCUMENT_ROOT is
/home/foo/web
then have this config in your httpd.conf file:This should take care of
RewriteEngine is not allowed
error you're getting.Also, just make sure you are editing the correct config file. I had created a file under /etc/apache2/users/USERNAME.conf but was editing /etc/apache2/httpd.conf.
Removing the USERNAME.conf file worked.