CheesyBeanz

Member
Nov 6, 2013
6
0
1
cPanel Access Level
Website Owner
Not sure if this is in the correct forum, so MOD's please move it if it isn't, thanks.

I have on my server, several directories on my domain, each hosting many PDF's for my customers; Each PDF is password protected. When my customers access the directory, they see their PDF's and each has a Name, Last Modified, Size and Description Column. How do I get the Description Column to show the description of the pdf file? I have entered descriptions everywhere all over the PDF but I still cant get it to show.

Thanks.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

You will need to add the "AddDescription" values in the .htaccess file. EX:

Code:
AddDescription "The Test Image" test.jpg
Thank you.
 

CheesyBeanz

Member
Nov 6, 2013
6
0
1
cPanel Access Level
Website Owner
Sounds simple enough. I've never made a HTAccess file before, is this all I need to put in the file bearing in mind, it'll only ever contain pdf's and the htaccess file itself?

Sorry for asking, but I'm a complete newbie.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Yes, that is the only line you will need to place in the file assuming you only want to add a description to a single file. You must add that entry in the .htaccess file for each file you want to create a description for.

Thank you.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,834
422
438
Finland
cPanel Access Level
Root Administrator
Did you notice that the filename is .htaccess ? Starting with a dot and lowercase.
 

CheesyBeanz

Member
Nov 6, 2013
6
0
1
cPanel Access Level
Website Owner
Yes, that how I named the file, I already knew it started with a dot and in LC. Does the server have to have anything enabled for this to work?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
The AutoIndex Apache module is required, however that should be compiled by default:

Code:
# httpd -l|grep autoindex
  mod_autoindex.c
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You should not add that to the .htaccess file. That's the output of a command that is ran via SSH. You may want to consult with your hosting provider for additional assistance.

Thank you.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,834
422
438
Finland
cPanel Access Level
Root Administrator
I added that to the .htaccess file but it's still not allowing the description to be shown.
If you added that to the .htaccess file you should get a 500-error.

If you didn't get the error it must mean that .htaccess is disabled.
 

CheesyBeanz

Member
Nov 6, 2013
6
0
1
cPanel Access Level
Website Owner
If you added that to the .htaccess file you should get a 500-error.

If you didn't get the error it must mean that .htaccess is disabled.
I didnt get any error, I was able to view the files as normal but without the description. Does my hosting provider have to enable it or can I do it cpanel?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Please contact your hosting provider for assistance to have them check why it's not working as intended for you.

Thank you.