GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   how would you do this (preferably using .htaccess) (https://gfy.com/showthread.php?t=271894)

AssFairy 04-19-2004 04:28 PM

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?

xenophobic 04-19-2004 04:31 PM

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.

AssFairy 04-19-2004 04:41 PM

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.

boldy 04-19-2004 04:41 PM

RehahahahahaEngine on
RehahahahahaRule ^/$ /some/where/else [R]

?

*edit* hahahahaha = w r i t e without the spacing .. :)

AssFairy 04-19-2004 04:50 PM

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

boldy 04-19-2004 04:53 PM

Add

DirectoryIndex notfound.html

or something ...

boldy 04-19-2004 04:54 PM

if it doesnt work read : http://httpd.apache.org/docs/misc/re...hahaguide.html :)

*edit* nice banned words Lens

AssFairy 04-19-2004 05:00 PM

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 :1orglaugh

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?

Serge Litehead 04-19-2004 05:22 PM

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


All times are GMT -7. The time now is 12:46 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123