Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

267
Vistas
.htaccess RewriteEngine causing Unexpected 403 Forbidden http response code in xampp

I am using xampp to test out some php code.

In the main project directory, I have the following .htaccess file:

RewriteEngine on

#Index
RewriteCond %{REQUEST_FILENAME} ^/$  
RewriteRule request_handler.php [L]

#php files
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} ^.*(\.php)$
RewriteRule . request_handler.php [L]

#Blocked files. PHP blocked files should be specified in request_handler.php
<Files "setup.json">
    Order Allow,Deny
    Deny from all
</Files>
<Files "testimonials.json">
    Order Allow,Deny
    Deny from all
</Files>

#CACHE CONTROLL FOR STATIC RESOURSES
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
    Header set Cache-Control "max-age=2592000, public"
</FilesMatch>

Anyhow, I am getting an unexpected 403 forbidden in all my requests. If I remove the first line of the .htaccess file though, I stop getting that unsuspected behavior.

Does anyone know what might be causing this error?

UPDATE I have created a new .htaccess file, that only contains one line: RewriteEngine On and I still get the error. (If I remove that line, I stop getting the error). The sole presence of that line causes the error.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Turns out, all I had to do was add the line Options FollowSymLinks before the RewriteEngine On directive.

Here's what Apache has to say:

To enable the rewrite engine in this context, you need to set "RewriteEngine On" and "Options FollowSymLinks" must be enabled. [...] This restriction is required for security reasons.

Apache documentation

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda