logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Directory Description
Author
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Tue 18 Jul '06 6:42    Post subject: Directory Description Reply with quote

I tried this in my htaccess file with no luck.

Code:
<Directory /htdocs/coding>AddDescription "Todays Office Reports"<Directory>


I can get descriptions for files, i just haven't been able to figure out how to make descriptions for directories.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 18 Jul '06 9:42    Post subject: Reply with quote

Only create in the specific folder a file HEADER.html in the HEADER.html write your Description. Done. (Work only if there is no index file)
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Tue 18 Jul '06 9:51    Post subject: Reply with quote

James Blond wrote:
Only create in the specific folder a file HEADER.html in the HEADER.html write your Description. Done. (Work only if there is no index file)


As of now I have a HEADER.html in the root directory with java and html for default for all pages.

Can you be more specific with your answer?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 18 Jul '06 9:57    Post subject: Reply with quote

READ THE MANUAL
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername

http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#adddescription
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Tue 18 Jul '06 11:44    Post subject: Reply with quote

James Blond wrote:
READ THE MANUAL
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername

http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#adddescription


I have read those. The reason i asked you to elaborate is because im missing something.

I don't understand how adding html to the header of the index will add a discription to that directory.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 18 Jul '06 13:35    Post subject: Reply with quote

OK! Now I know what you don't understand!
Apache itself include the content of the HEADER.html to the HTML output from the directority when Apache reads a folder / directority
if you have a README.html into the folder Apache will append the HTML to the output.

example
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Wed 19 Jul '06 4:34    Post subject: Reply with quote

Ok i have the header.html. From what i understand i can specify any html file to be my header using the HeaderName filename put into an htaccess file.

So assigning descriptions becomes a part of the html. And we do this by using the <title> tag inside the html file. Right? Wrong because i added a title and meta test tag to my HEADER.html file and it didn't give me a description.

Im also confused about that bit you said about switching to the README.html. What do you need to edit the README aka footer for adding a description. The footer just adds html to the bottom of the page.

On that example i see the README.html is assigned as the FOOTER. I also see descriptions but i still don't understand where they are assigned. Is it in the HEADER file?

So im back to asking you how this is done.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 19 Jul '06 9:33    Post subject: Reply with quote

Hm, you want to change the <title>my Title</title> or do you want to change the path which is shown?

Create the output yourself with PHP, than you can control everything
Here is the code to do that
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Wed 19 Jul '06 11:20    Post subject: Reply with quote

Ok you've given me something like three answers and im obviously too dense to understand any of them.



I won't even try to guess what im suppose to do with that php file. I put it on the server as a asdf.php and it came out gibberish. Keep in mind here im not a server guru.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 19 Jul '06 11:56    Post subject: Reply with quote

AddDescription "string" file|directory [file|directory]

AddDescription "httpd project" /path

can be set in httpd.conf or .htaccess

was in my second link!
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#adddescription
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Wed 19 Jul '06 18:18    Post subject: Reply with quote

Ive done it with files before but i haven't been able to get it done with folders. This was the nature of my original question.

AddDescription "test" hostedbybrain.gif works

Its probably a syntax problem.

AddDescription "test" crypto
AddDescription "test" /crypto
AddDescription "test" C:/Apache2/htdocs/crypto
AddDescription "test" /htdocs/crypto

Does not work
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3057
Location: Hilversum, NL, EU

PostPosted: Wed 19 Jul '06 19:02    Post subject: Reply with quote

From the Apache documentation:


AddDescription Directive

This sets the description to display for a file, for FancyIndexing. File is a file extension, partial filename, wild-card expression or full filename for files to describe. String is enclosed in double quotes (").


No mention of folders, seems not to work with folders.
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Wed 19 Jul '06 19:06    Post subject: Reply with quote

Well they're doing it on that apache mirror that James Bond posted before.
Back to top
pnllan



Joined: 05 Dec 2005
Posts: 221

PostPosted: Wed 19 Jul '06 19:21    Post subject: Reply with quote

Bob,

I think that James was indicating that you can use something similiar to the PHP file that he list in conjunction with the Apache directive HeaderName, not as a standalone file.
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Wed 19 Jul '06 21:39    Post subject: Reply with quote

pnllan wrote:
Bob,

I think that James was indicating that you can use something similiar to the PHP file that he list in conjunction with the Apache directive HeaderName, not as a standalone file.


Thank you. I went back and played with that php code. I saved it on the server as unincoded text instead of ANSI text. Thats what was making the server read it as gibberish.

Ill play with it and see if i can get the descriptions put up as it needs to be. Thank you james and you too pnllan.
Back to top
Bobscrachy



Joined: 13 Feb 2006
Posts: 39
Location: Texas

PostPosted: Sun 13 May '07 22:30    Post subject: Reply with quote

After all this time i finally figured out how to do this.

AddDescription "blaw blaw" name of directory (not path)
Back to top


Reply to topic   Topic: Directory Description View previous topic :: View next topic
Post new topic   Forum Index -> Apache