Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

DirectoryIndex, and other commands for the htaccess file???

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  500 error with é  
Author Message
jbarrington

External


Since: Jul 25, 2003
Posts: 8



(Msg. 1) Posted: Sun Jul 27, 2003 11:04 pm
Post subject: DirectoryIndex, and other commands for the htaccess file???
Archived from groups: alt>apache>configuration (more info?)

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]

 >> Stay informed about: DirectoryIndex, and other commands for the htaccess file??? 
Back to top
Login to vote
nospam173

External


Since: Jul 02, 2003
Posts: 52



(Msg. 2) Posted: Mon Jul 28, 2003 3:56 am
Post subject: Re: DirectoryIndex, and other commands for the htaccess file??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 27 Jul 2003 20:04:46 -0400, The Other Guy responded to a post
from "John B." <jbarrington.DeleteThis@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).

<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex" target="_blank">http://httpd.apache.org/docs-2.0/mod/mod_dir.html#directoryindex</a>

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."<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: DirectoryIndex, and other commands for the htaccess file??? 
Back to top
Login to vote
jbarrington

External


Since: Jul 25, 2003
Posts: 8



(Msg. 3) Posted: Thu Jul 31, 2003 3:48 pm
Post subject: Re: DirectoryIndex, and other commands for the htaccess file??? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"The Other Guy" <nospam.RemoveThis@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 <a style='text-decoration: underline;' href="http://www.xyz.com" target="_blank">http://www.xyz.com</a>
Inside the <a style='text-decoration: underline;' href="http://www.xyz.com" target="_blank">http://www.xyz.com</a> 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
<a style='text-decoration: underline;' href="http://www.xyz.com" target="_blank">http://www.xyz.com</a> instead of <a style='text-decoration: underline;' href="http://www.xyz.com/httpdocs/" target="_blank">http://www.xyz.com/httpdocs/</a>
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.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: DirectoryIndex, and other commands for the htaccess file??? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Can htaccess include another file? - Hi, I want to achieve something like this. Imagine I have a file called textfile_ips.txt which contains a whole bunch of IP addresses which I want to blocked, one per line. Can I do something like this? <Files "somefile.html"> deny ...

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the instructions on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..

.htaccess not looked at in aliased directory - Hi all, really appreciate some help on this! All my files within /var/www/html obey their .htaccess fine, including LIMIT commands and php_flag settings. However, I have an Alias in my httpd.conf like this... Alias /squirrelmail /var/www/squirrelmail/...

password protection (.htaccess) and streaming mp3's - Hey folks, just for the record this work in winamp. I have an apache web server with an mp3 link that is password protected. After authorization you can see the mp3's. Click on a link and the little web engine I'm using (Zina) automagically creates a..

Apache 2.0.47 doesn't create PID-FILE - Hi Folks, I nearly successfully went over to use Apache 2.0.47 instead of a 1.3.X-Version. All went well - I can start the Server without problems, but trying to use "apachectl stop" end in an error message: /usr/sbin/apachectl stop: httpd (no...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]