Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

322
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!