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

310
Vistas
Preventing page (folder) redirection with Awardspace hosting

I'm using LAMP hosting on AwardSpace.com.

I have a private folder foobar and when a page </foobar> is requested, it redirects with a 301 to </foobar/> (, allowing pentesters to tell that the folder exists). This is so even after adding a htaccess file:

rewriteengine on
rewriterule foobar$ testpage.php

I believe the server itself is doing the redirection regardless of my hosting content.

How can the redirect be prevented?


(Tried removing traversal access to the folder but it shows 403 and testpage.php doesn't load.)

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

0

(For undocumented behavior,) To prevent folders being 301ed‑with‑slash‑appended, you can add a redirect flag to the rewrite rule:

rewriterule foobar$ /testpage.php [r]

With that, no one will know that foobar is actually a folder.


Suppose HTTP redirection is unwanted, r can be appended with =x where x is a value that doesn't cause redirection. This can be 305. This can be 510. This can be 200. In such cases the 3rd argument is ignored (cf):

rewriterule foobar$ yadadadaada [r=200]


Suppose that content is required, content can be added:

errordocument 200 "test page"

, or:

errordocument 200 /testpage.php
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