![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2003
Location: AssTown
Posts: 674
|
how would you do this (preferably using .htaccess)
How would you set a directory so that a call to
somedomain.com/somedirectory/index.html would load the index.html but a call to somedomain.com/somedirectory/ could be redirected because they didn't include the index.html Can this be done?
__________________
I sale lube |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Mar 2004
Location: Dallas
Posts: 874
|
are you wanting to stop showing a directory listing?
in .htaccess you just place Options -Indexes if that's the case, if not look @ mod_rew\rite, I'm not sure I understand the question, so can't tell much more than that. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Join Date: Jun 2003
Location: AssTown
Posts: 674
|
Quote:
Problem is that if you don't request a file name in the URL it looks for an index file , if it finds one it doesn't generate a 303 or 404 error. Just wondering if there's a way round it.
__________________
I sale lube |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Macdaddy coder
Industry Role:
Join Date: Feb 2002
Location: MacDaddy pimp coder
Posts: 2,806
|
RehahahahahaEngine on
RehahahahahaRule ^/$ /some/where/else [R] ? *edit* hahahahaha = w r i t e without the spacing .. ![]()
__________________
MacDaddy Coder. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Jun 2003
Location: AssTown
Posts: 674
|
Quote:
__________________
I sale lube |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Macdaddy coder
Industry Role:
Join Date: Feb 2002
Location: MacDaddy pimp coder
Posts: 2,806
|
Add
DirectoryIndex notfound.html or something ...
__________________
MacDaddy Coder. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Macdaddy coder
Industry Role:
Join Date: Feb 2002
Location: MacDaddy pimp coder
Posts: 2,806
|
if it doesnt work read : http://httpd.apache.org/docs/misc/re...hahaguide.html
![]() *edit* nice banned words Lens
__________________
MacDaddy Coder. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jun 2003
Location: AssTown
Posts: 674
|
Quote:
![]() maybe there's a way to use .htaccess to tell the server NOT to look for an index page and therefore generate a 404 error when an open directory is called?
__________________
I sale lube |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
in your httpd.conf you set
DirectoryIndex index.html index.htm index.php index.cgi index.pl default.htm default.html apache loads whichever finds first in the order you have so you need to remove index.html from DirectoryIndex, this directive also works from htaccess file, after you remove index.html, set ErrorDocumen</b>t 404 /404.html or index in your htaccess |
![]() |
![]() ![]() ![]() ![]() ![]() |