This is a discussion on DirectoryIndex, and other commands for the htaccess file??? within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm on a shared host (Apache/RedHat), and I'm new with setting up various directories for my files. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm on a shared host (Apache/RedHat), and I'm new with setting up various
directories for my files. I've created an htaccess file in the root, and I've set up most of my web site files under "/httpdocs". Inside that htaccess file, I've added "DirectoryIndex /httpdocs/index.htm" In the httpdocs directory, I also have my other site directories, my other htm linked files, and the directories that contain the images for all of my htm files. I was wondering if there are any other commands that I can add to the htaccess file where it will look for the other directories, htm files, and images within the httpdocs directory and it's sub directories? -- Change [comcast.non] to [comcast.net] |
|
|||
|
On Sun, 27 Jul 2003 20:04:46 -0400, The Other Guy responded to a post
from "John B." <jbarrington@comcast.non> who wrote in alt.apache.configuration: >I'm on a shared host (Apache/RedHat), and I'm new with setting up various >directories for my files. > >I've created an htaccess file in the root, and I've set up most of my web >site files under "/httpdocs". >Inside that htaccess file, I've added "DirectoryIndex /httpdocs/index.htm" >In the httpdocs directory, I also have my other site directories, my other >htm linked files, and the directories that contain the images for all of my >htm files. > >I was wondering if there are any other commands that I can add to the >htaccess file where it will look for the other directories, htm files, and >images within the httpdocs directory and it's sub directories? In the httpdocs directory htaccess, put: DirectoryIndex index.htm other_index_file.name etc.filename note the last two are just examples. But if the other directories have an index.htm file there is no need to put anything more. But if you had an index.html in one for the index/main page in a subdirectory, or an index.php, and so on, just put them in the list as my example shows. It doesn't matter what you put in the list really. If there are two files in the same directory that are in the list, the one nearer the beginning would be served in that order (i.e, index.htm would be served and not other_index_file.name, if both were in the same folder). http://httpd.apache.org/docs-2.0/mod...directoryindex HTH TOG -- ../configure --prefix=~/zyterion Not this guy or that guy, The Other Guy. "If you're not thoroughly confused by now, then you just don't understand the situation." |
|
|||
|
"The Other Guy" <nospam@this.addy> wrote in message news:eos8ivgotvm0uok4kvlqsh3mqd22r84v71@4ax.com... > In the httpdocs directory htaccess, put: > DirectoryIndex index.htm other_index_file.name etc.filename > ... Thanks for the reply. I think that I'm really asking for something that may not exist. Let's say that I have an Apache virtual web site called http://www.xyz.com Inside the http://www.xyz.com virutal root, there are three subdirectories; cgi-bin, httpdocs, and httpsdocs. Inside the normal httpdocs, I have my images sub-directory, a few other useful sub-directories, and other .htm files. Inside the httpsdocs, I'm trying to setup a separate secured area, and I've setup a sort of duplicate set of sub-directories inside of it, but different content. I'm basically trying to treat the two directories as separate with separate information. Whenever someone goes to the site, the .htaccess that I setup displays http://www.xyz.com instead of http://www.xyz.com/httpdocs/ This is what you described, and one of the things that I was looking for. When I setup the ".htaccess" to look for the "index.htm" in "httpdocs/", it still tries to look for any references to the image sub-directory inside the root directory instead of looking for that sub-directory inside "httpdocs/". Instead of me changing the many internal links and image addresses inside my "index.htm" to look at "httpdocs/", I was wondering if there was something for Apache. |
| Thread Tools | |
| Display Modes | |
|
|