View Full Version : .htaccess in a subfolder?
03-21-2005, 12:00 PM
Is there a problem with having a .htaccess file in a subfolder rather than in the root?
I have two exact copies of a .htaccess, one i the root and one in a subfolder. Only the one in the root works.
I want it to redirect domain/ to domain/entrance.html.
Thanks for any hints,
03-21-2005, 02:51 PM
Hmm, I believe there's a directive for this that can be placed in either httpd.conf or in .htaccess. The default, (or at least the setting found on most servers I've worked with), is that .htaccess is on a per-directory basis, where all the .htaccess files are used for a multilevel path. That is, a path like "/yourdirectory/yourcms/cmsmain.php" will engage the .htaccess file first in "/yourdirectory" and then in "/yourdirectory/yourcms".
03-22-2005, 10:14 AM
but the .htaccess in the subfolder doesn't seem to work?
Can I obtain what I want in the root .htaccess?
03-22-2005, 11:31 AM
In all probability, yes.
I think I'll move this over to the server side forums, though. It's certainly not an HTML & CSS question.
03-22-2005, 02:16 PM
Ok, thanks, html & css was just were I felt safe :o
Can someone provide me with a recipe?
03-22-2005, 04:30 PM
im running apache 1.3 on win98
in HTTPD.conf, check these things
this one controls what options can be changed for a specific directory by a .htaccess file
# This should be changed to whatever you set DocumentRoot to.
<Directory "D:/program files D/Apache Group/Apache/htdocs">
#some stuff, clipped for readibility
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
this one tells the server what folder specific folders should be called, should be default, but check anyway
#this one just tells not to give .ht* files to clients
<Files ~ "^\.ht">
Deny from all
03-26-2005, 10:09 PM
could you not just use a META refresh?
<META HTTP-EQUIV=Refresh CONTENT="1; URL=http://www.SITE.com/entrance.html">
NOT SUPPORTED ON ALL BROWSERS - but its effective and most people have IE 5+
Hope it helps
04-03-2005, 01:03 AM
DirectoryIndex entrance.html index.html index.php
What this does is set the default page for your site ot any of the following. If you just want entrance.html remove the others, or add more if you need.
Redirect / http://www.yoursite.com/entrance.html
This redirects http://www.yoursite.com to http://www.yoursite.com/entrance.html
I think those are what you need
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.