.htaccess RewriteEngine causing Unexpected 403 Forbidden

Problems with the Windows version of XAMPP, questions, comments, and anything related.

.htaccess RewriteEngine causing Unexpected 403 Forbidden

Postby juanchoarboleda1 » 05. August 2021 02:42

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 :)
juanchoarboleda1
 
Posts: 5
Joined: 23. November 2020 23:07
XAMPP version: 8.0.9
Operating System: Windows 10

Re: .htaccess RewriteEngine causing Unexpected 403 Forbidden

Postby juanchoarboleda1 » 05. August 2021 03:20

Turns out, all I had to do was add
Code: Select all
Options FollowSymLinks
before
Code: Select all
RewriteEngine On
directive.
Hope this helps.
juanchoarboleda1
 
Posts: 5
Joined: 23. November 2020 23:07
XAMPP version: 8.0.9
Operating System: Windows 10

Re: .htaccess RewriteEngine causing Unexpected 403 Forbidden

Postby Nobbie » 05. August 2021 09:21

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.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 137 guests