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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-19-2004, 04:28 PM   #1
AssFairy
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
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:31 PM   #2
xenophobic
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.
xenophobic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:41 PM   #3
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
Quote:
Originally posted by xenophobic
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.
No I don't want them to see the directory I want to be able to redirect them to another url.

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
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:41 PM   #4
boldy
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.
boldy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:50 PM   #5
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
Quote:
Originally posted by boldy
RehahahahahaEngine on
RehahahahahaRule ^/$ /some/where/else [R]

?

*edit* hahahahaha = w r i t e without the spacing ..
Nope, I just tried it and its still loading the index.html
__________________
I sale lube
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:53 PM   #6
boldy
Macdaddy coder
 
Industry Role:
Join Date: Feb 2002
Location: MacDaddy pimp coder
Posts: 2,806
Add

DirectoryIndex notfound.html

or something ...
__________________
MacDaddy Coder.
boldy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 04:54 PM   #7
boldy
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.
boldy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 05:00 PM   #8
AssFairy
Confirmed User
 
Join Date: Jun 2003
Location: AssTown
Posts: 674
Quote:
Originally posted by boldy
if it doesnt work read : http://httpd.apache.org/docs/misc/re...hahaguide.html

*edit* nice banned words Lens
dayum that page would take me a week to digest

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
AssFairy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-19-2004, 05:22 PM   #9
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
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
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.