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

138
Vistas
RewriteRule in .htaccess for directories destroys general 404 ErrorDocument and creates 500

I added a RewriteRule to make the path of '/some-page' opening the '/some-page/index.php' but showing '/some-page/' in the browser's address bar. This works fine as expected.

On the other hand I have now the problem that whenever I type a not-existing path like e.g. '/this-does-not-exist.html' I am prompted a 500 message and not redirected to the 404 page anymore.

And if I type e.g. '/kontakt' I am prompted with an 404. But if I type '/kontakt.php' it works. It should show '/kontakt.php' if I type '/kontakt' and should show '/kontakt' in the browser's address bar.

Here is the part of my .htacces:

ErrorDocument 400 /400.php
ErrorDocument 401 /401.php
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
ErrorDocument 503 /503.php

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
over 4 years ago · Santiago Trujillo
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