Solved

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

Posted on 2004-08-27
3
194 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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