Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8927501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:14:03+00:00 2026-06-15T08:14:03+00:00

For directory listings, I’ve created a common .htaccess file as well as a common

  • 0

For directory listings, I’ve created a common .htaccess file as well as a common header (“HeaderName /header.html).

Everything works fine, except one thing: while I don’t want the derpy h1 version of “Index of /blah”, I’d like to display a customized (and normal-sized) version of that, e.g., “CurDir = /blah”. By default, specifying the HeaderName replaces all of that with some static text.

I tried embedding a bit of PHP (getcwd()) but that just returned the root directory where the header.html lives, no matter what subtree was being displayed. Surely there’s some way to access the CWD without having to sprinkle control files like this in each subfolder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:14:04+00:00Added an answer on June 15, 2026 at 8:14 am

    I stumbled upon what may be a suitable environment variable while looking at the phpinfo() output… but is there a better (more common) way people handle this, perhaps without even using PHP?

    <?php
    $dir = getenv("REQUEST_URI");
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get an HTML-based recursive directory listing based on code here:
We have a Business Listings directory hosted on IIS 6 Windows 2003. Our competitors
this is my directory structure /home /template /classifieds /listings I want to hide /template
I'd like to enable Apache directory listings on a specific subdirectory of my Rails
I am unable to stop apache from creating directory listings when using the server
I have a custom taxonomy called dcategory so I have created a template file
Is there any tutorial about FTP transactions(like download, upload and files/directory listings) using Microsoft
I'm trying to compare multiple arrays of strings containing file listings of directories. The
My web server is Apache. I have disabled directory listings via an Options -Indexes
I am using the official Dropbox API for Java. So far, everything works smoothly.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.