Solved

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

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

732 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