Want to change apperance of server default directories

They have: 68 posts

Joined: Jun 2006

Hey,

I'm looking to change the appearance of my server default directories. I may be terming it wrong... so i'll link you to what i'm talking about.

http://www.foothillsbaptist.org/channel3/program_schedules/

Basically, i'm designing an intranet that is going to utilize these directories (since it'll be hosted on a server at the company). The only thing is, i wanted to know if there's a way to change the appearance of how the information is displayed. If there's a way to tie it to a style sheet, change the background color, fonts, etc.

If anyone has any idea how... or maybe if there's a program you can purchase that allows for a similar system... i'd really appreciate it.

Thanks.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

In the uppermost directory that you want this to take effect, add a file called .htaccess (or if you already have one, add this to it)

Assuming the php file is in the root of domain with the name dirlist.php, add the following line to .htaccess. (also include any other variations of a default filename you want, it will try use them from left to right)DirectoryIndex index.php index.html /dirlist.php'
Now in the dirlist.php file, you can find what directory was called via $_SERVER['REQUEST_URI'] (note this is the absolute directory of the domain, not the server directory).

Should work, I did a test on my server and it seemed to be good.

-Greg

They have: 68 posts

Joined: Jun 2006

Sorry... this is confusing me.

I got the .htaccess file open and it reads:

# -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* order deny,allow deny from all allow from all order deny,allow deny from all AuthName www.foothillsbaptist.org AuthUserFile /home/footh4/public_html/_vti_pvt/service.pwd AuthGroupFile /home/footh4/public_html/_vti_pvt/service.grp '

After that, you lost me. I'm not sure what php file you're talking about and where exactly to place the code.

If it's not too much trouble.. can you kinda explain it again but a little more elaborately? I only recently started dabbling in php, so i really am not terribly familiar with that code, rather just with HTML.

Thanks for your help.

They have: 68 posts

Joined: Jun 2006

After looking around and investigating more about the .htaccess file... i think you misunderstand what i'm striving for.

If you view this link (or look at the picture):
http://www.foothillsbaptist.org/channel3/images/

You see the default server directory (i could be terming this wrong.. so it'd be best to look). So you're just seeing the folder on the server and its contents and subdirectories. What i'm wanting to do, is change how this page is generated, at least in terms of colors/fonts/backgrounds.

Is this possible? Does anyone know how to do this?

Thanks for your help.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

My mistake, in looking up the info to give you, I was reading a forum where someone asked a simliar question, but they had their own PHP file to handle displaying the way they wanted, and when I replied here, I was thinking it was you who already had the php file to handle it. I will look more into the way you want to modify it tomorrow, and if I don't find anything or someone else reponds, I'll post a little PHP program you can use with what I gave you Smiling

Sorry about the confusion.

-Greg

They have: 68 posts

Joined: Jun 2006

Thanks a bunch for your help. I actually was able to find somewhat of a tutorial on how to do it (though i still can't get it to work).

I made a separate post with all the new info i gathered... which i'll post below.

I really do appreciate your help.

Thanks again.

Quote: Hey,

I'm working on making the apache-generated directory listings (see picture below) look more like my site. I've found a couple articles on the subject.. but am unfamiliar with altering the .htaccess file and putting in the new commands.

This article: http://www.webpronews.com/expertarticles/expertarticles/wpn-62-20060220ModifyinganAutoIndexedFileListtoMatchyourSitesDesign.html

Tells me to input commands into the .htaccess file.. such as these:

Options Indexes
   IndexOptions FancyIndexing SuppressDescription SuppressHTMLPreamble
   HeaderName header.html
   ReadmeName footer.html
   IndexIgnore header.html footer.html .htaccess
'

What i'm confused about is how to exactly do this.

My .htaccess file reads like this:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.foothillsbaptist.org
AuthUserFile
/home/footh4/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/footh4/public_html/_vti_pvt/service.grp

Options Indexes
   IndexOptions FancyIndexing SuppressDescription SuppressHTMLPreamble
   HeaderName header.htm
   ReadmeName footer.htm
   IndexIgnore header.htm footer.htm .htaccess
'

I uploaded the new .htaccess in both binary and ascii.. neither worked. I added a header.htm and footer.htm in the same directory with nothing but a different background color (hopefully just enough to change the presentation so that i know it's working).

Unfortuntately, no change occured.

Can anyone help?

Thanks.

They have: 68 posts

Joined: Jun 2006

Greg,

I was able to get a solution from someone on a different forum. But i really do appreciate your help.

Thanks again.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.