This is one solution that solved the problem for me. The rewrite module was always on, used in IfModule rewrite_module, permissions were provided, and the contents of .htaccess was fine, but still there were 500 errors when trying to use the rewrite module.
In httpd.conf by default: This is a source of a 500 error if you try to use rewrite in .htaccess in some sub directory. ` # Deny access to the entirety of your server filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride none Require all denied </Directory> `
This way you can use .htaccess with the rewrite module in a specific directory. You would add a <directory> block for this directory. If you copy and paste a directory block, you need to make sure that the target of the block you copied is correct for the directory to which you want to apply it.
So, for my intention, this block causes error 403, but gets rid of error 500.
<Directory "c:/Apache24/htdocs/store"> AllowOverride All Options None Require all granted </Directory> Changing to this solved the issue: <Directory "c:/Apache24/htdocs/store"> AllowOverride All Require all granted </Directory>
I suppose that's why the problem is often encountered, but rarely solved in these threads. If I just copied another block, typed in my own block, or had any idea what I was doing, that would not be a problem.
I canβt say that it solves all problems, but I hate it when people solve and run without understanding the rest of us. So for those who made my mistake, this is the answer.
Mike
source share