View Full Version : How Do You Get A Page To Do This?
canonloader
6th of June 2009 (Sat), 06:43
I have been wondering how you get a page to do this (http://www.janajae.com/sniderscamp/). I have seen them a lot, but have not figured it out. Is it just some kind of link to a folder?
cdifoto
6th of June 2009 (Sat), 06:44
All you do is not upload an index file. Every website has an index.whatever page in the root folder. If that index file is deleted, the page won't display but the contents will be listed. If you never wanted an index page to begin with and it's just a folder holding content, you want to turn off indexing in your host's control panel so that that stuff isn't shown.
canonloader
6th of June 2009 (Sat), 06:47
What's an index file?
cdifoto
6th of June 2009 (Sat), 06:49
A file named index. Browsers know that a file named index is meant to be displayed when the url is typed in directly, and you know (as a website designer/programmer) that the page to be displayed when the url is typed in should be named index. There are others that work too but I use index out of habit, as do most other website creators.
http://support.tigertech.net/index-file-names
canonloader
6th of June 2009 (Sat), 07:03
Amazing, that worked, thanks. :)
So, putting an htaccess file in a certain directory makes that work only in that directory, not in all others?
cdifoto
6th of June 2009 (Sat), 07:21
As far as I know it's only for the directory it's in.
canonloader
6th of June 2009 (Sat), 08:30
Yup, your right, I tested it. :)
Scottes
9th of June 2009 (Tue), 17:04
It can depend on your web server configuration, too. With Apache, it "defaults" to looking for index files, and you can configure a list (index.html, index.htm, anything.cgi, etc). If a client requests a directory (http://www.mitch.com/gallery) then Apache will try to load {web_root_dir}/gallery/index.html (then index.htm, then anything.foo). If that index file does not exist, then it will send a directory listing (a listing of all the files in that directory), which is what you see when you click on your first post.
You can configure Apache to NOT list the directory. This is preferred for a (poor/simple) form of security.
On my server, I have this configured. Browse to
http://www.itsanadventure.com/postimages/Osprey_101711.jpg
and you get a picture of an Osprey. But browse to the directory it's in,
http://www.itsanadventure.com/postimages/
and you get "Directory Listing Denied" because I don't want people to be able to see all files and select any of them. On my server, if you don't know the name of the file then you don't get anything.
Most web server software packages will do all of the above, not just Apache.
For .htaccess files - the leading period hides it under Unix, which I'm used to.
.htaccess will work only on the current dir. It can be used for a host of things, like requiring login, denying access to certain client IPs or subnets, URL rewrites, etc.
I have it configured so that my images will not be displayed if the referrer is not listed in the .htaccess. That it, if someone reads POTN, they can see my image linked into the page. But if some scumbucket on MySpace links directly to my images, they get a GIF that says "Hotlinking Denied." This stops some people from stealing my images and my bandwidth to display my photo.
It does not stop them from getting the image, just from linking it into their website. Now they have to download my image and upload it to their server. So it's very trivial, but it stops 99% of the scumbuckets who are too stupid to know how to do that kind of download/upload stuff.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.