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: Help with .htaccess/httpd.conf
Author
msaz87



Joined: 07 Jul 2006
Posts: 16

PostPosted: Sun 16 Jul '06 3:15    Post subject: Help with .htaccess/httpd.conf Reply with quote

Hey all.. i've got 2 .httaccess/httpd.conf questions

The first,
My httpd.conf must be configured strangely... as it was set initially to ignore .htaccess files altogether. With this, i'm guessing it's also set to ignore icons. I'd like them to appear... but am unsure what's wrong.

Here's my .htaccess:
Code:
Options +Indexes
   IndexOptions FancyIndexing SuppressDescription SuppressHTMLPreamble
   HeaderName /header.htm
   ReadmeName /footer.htm
   IndexIgnore header.htm footer.htm .htaccess direclogo.gif

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php
</IfModule>


Here's my httpd.conf:
Code:

Sorry. I thought i should post it because originally the AllowOveride was set to None, which i thought wasn't the usual setting (so i thought there might be more irregularities)


..and here's my httpd-autoindex.conf file that seems to do nothing (as it looks like the icon info is in there.. it just isn't read):
Code:

IndexOptions FancyIndexing HTMLTable VersionSort

Alias /icons/ "C:/Program Files/Apache Software Foundation/Apache2.2/icons/"

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/icons">
    Options Indexes MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes.  These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t


The second,
I'm trying to use the .htaccess to format directories in a way that i can use on the intranet i'm building. Basically, i want the directories to serve as downloads folders that employees can drop files into. My thing is, i want them to be formatted properly with colors and a logo. I've gotten the colors part down with using a header.htm and footer.htm ... but i can't get a logo to repeat on newly generated folders. What i mean is, if an employee creates a new folder in one i've already set up, the .htaccess is read into there... and it finds the colors from the parent directory, but not the logo.

Here's the header.htm code:
Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Arizona Belo — Downloads</title>
<style
type="text/css"> <!-- A:link {text-decoration:none} A:hover {text-decoration:underline} A:visited
{text-decoration:none} --> </style>
</head>

<body bgcolor="#DD1032" text=#000000 link=#FFFFFF vlink=#C0C0C0>

<p><img border="0" src="http://www.foothillsbaptist.org/channel3/downloads/accounting/direclogo.gif" width="600" height="120"></p>

</body>

</html>


Hopefully that makes sense.

If anyone has any idea what i'm doing wrong on these two things.. i'd greatly appreciate guidance. Thanks.

Mod: never ever post so long contents!


Last edited by msaz87 on Sun 16 Jul '06 22:07; edited 1 time in total
Back to top
James Blond
Moderator


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

PostPosted: Sun 16 Jul '06 12:46    Post subject: Reply with quote

Never post the hole httpd.conf ever again! We know the content, if you haven't changed it! Mad

to your second question: the file isn't included because
Code:

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

you have to uncomment it
Code:

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf


for the error with your .htaccess files. Are you sure that the ending is .htaccess and not .htaccess.txt? Do your Windows show all file exteinsion? Something in the error log file from apache?

With OS do yu run? Which version from Apache? Please see the forum rules!
Back to top
msaz87



Joined: 07 Jul 2006
Posts: 16

PostPosted: Sun 16 Jul '06 22:39    Post subject: Reply with quote

It's running on a Windows 2003 Server with Apache 2.2.

No, it's not a .txt extension. The server is reading them fine, i just want to get them to feed all the way through.

This problem isn't a big deal, i'm actually thinking about scrapping the idea since it seems to be a bigger hassle than it's worth.

But thanks anyways and thanks for the answer to the icons question.
Back to top


Reply to topic   Topic: Help with .htaccess/httpd.conf View previous topic :: View next topic
Post new topic   Forum Index -> Apache