Solved

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

Posted on 2004-08-27
3
187 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
3 Comments
 
LVL 2

Accepted Solution

by:
brozzis earned 50 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now