?
Solved

Adding text to each of the index pages generated by Apache using .htaccess

Posted on 2004-08-27
3
Medium Priority
?
195 Views
Last Modified: 2010-03-04
I want to add some text right below "Index of X" on the index pages in Apache.  I can't change the server config, so I need to do this with a .htaccess file.  Is there a way of doing this?
0
Comment
Question by:tboneuls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
brozzis earned 200 total points
ID: 11920169

see:
http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html

You should be sure that mod_autoindex is loaded in your apache server:

LoadModule autoindex_module modules/mod_autoindex.so

I took this from my vh configuration,
it comes out pretty straightforward which lines use in your .htaccess:

<Directory "/var/www/sites/nexus/autoindex/">
    AllowOverride None
    Options Indexes
    Order allow,deny
    Allow from all
    HeaderName HEADER.html
    ReadmeName FOOTER.html
     IndexOptions IgnoreClient
    IndexOptions HTMLTable
    IndexOptions SuppressColumnsorting
</Directory>

this is obviously just an example,
the directive HeaderName HEADER.html adds to your index file
the content of the HEADER.html file, and if I understood correctly is what you were looking for.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question