Page 1 of 1

.htaccess RewriteEngine causing Unexpected 403 Forbidden

PostPosted: 05. August 2021 02:42
by juanchoarboleda1
Hey there.

I have this issue. Whenever my .htaccess file contains
Code: Select all
RewriteEngine On
line, I get an unexpected 403 forbidden http status code on every request. I even created an .htaccess file that only contained one line:
Code: Select all
RewriteEngine On
. If I removed the line, I would get xampp normal behavior. But when the line was present in the .htaccess file, I would get a 403 forbidden status code on every request.

Does anyone know what might be causing the issue.

The 403 message is:

Forbidden

You don't have permission to access this resource.
Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.9 Server at localhost Port 80

I hope someone can help.

Thanks :)

Re: .htaccess RewriteEngine causing Unexpected 403 Forbidden

PostPosted: 05. August 2021 03:20
by juanchoarboleda1
Turns out, all I had to do was add
Code: Select all
Options FollowSymLinks
before
Code: Select all
RewriteEngine On
directive.
Hope this helps.

Re: .htaccess RewriteEngine causing Unexpected 403 Forbidden

PostPosted: 05. August 2021 09:21
by Nobbie
That does not help anybody. Obviously there is a RedirectRule or so which redirects to a symbolic link or similar. As we dont know your .htaccess, we dont know anything.