LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-20-2009, 03:50 PM   #1
elliot01
Member
 
Registered: Jun 2009
Location: UK
Distribution: CentOS / RedHat
Posts: 89

Rep: Reputation: 16
Apache .htaccess file - variables


Hi all,

I have a bunch of folders within my intranet, each with a .htaccess file as follows:

Code:
Options +Indexes
        IndexOptions +FancyIndexing
        IndexOptions +SuppressHTMLPreamble
        HeaderName .dir-header.html
        IndexIgnore *.doc *.docx *.htm *.html *.pub *.txt *.xls *.xls
        ServerSignature Off
My .dir-header.html file is as follows:

Code:
<html>
<style type="text/css">
<!--
body {
        background-image: url(../../../../../images/background_gradient.gif);
        background-repeat: repeat-y;
}
-->
</style>
<p><em><strong>Documentation Category 1</strong></em></p>
</html>
What I want to know is if I can replace my manually input directory list header (ie: "Documentation Category 1") with an Apache variable for the current directory?

It's basically so I can just copy my .dir-header.html file into any directory without having to manually edit it to reflect the correct directory - instead it dynamically displays the correct/current one.

I have honestly tried Googling this but I just ended up with a headache.

Could anyone advise if this can be done?

Thank you!

Elliot
 
Old 10-21-2009, 10:23 AM   #2
SethsdadtheLinuxer
Member
 
Registered: Jun 2007
Posts: 152

Rep: Reputation: 37
check out this link
http://www.askapache.com/htaccess/ap...-htaccess.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache .htaccess file...Is my site safe? jimbo1708 Linux - Security 7 08-15-2007 07:57 AM
Help with Apache and .htaccess spud Programming 1 03-17-2005 11:52 AM
apache .htaccess emetib Linux - Software 4 09-22-2003 06:50 AM
is htaccess on apache 2.0 not the same as in 1.3 abd_bela Linux - General 3 07-23-2003 05:17 AM
Apache & the .htaccess file robeb Linux - Software 1 05-15-2002 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration