How do some websites have, for example, www.domianname.com/folder/ as a viewable page? Mine just show up as a directory index and I cannot fathom how to make it into something else. Any help? Thanks!
Every folder must have an index file.Its the first thing a browser looks for.Otherwise,as you have found,you will just get a list of files.
MK, I never knew that! Duh me! Thanks. I'm re-designing the whole thing right now so good chance to get it right 2nd time around
Don't put yourself down.We all got to learn somewhere.Thats one of the fun things about it.It's really great after hours of frustration and hard work to finally get it right and see the final result. Good luck with your site.
Yes, as MKInfo said if one of the following files is present in the directory it will be shown instead of a directory list... index.htm, index.html, index.shtml, index.php, default.htm, default.html, etc. You can also use a .htaccess file. Here's how: 1.) Create a file called .htaccess in your root directory 2.) Open the .htaccess file in Notepad and type the following... RewriteEngine on RewriteRule ^folder/$ test.php The ^ is the start of line anchor and the $ is the end of line anchor. Anything in between that is what the person is requesting. What comes after the $ is what should be returned instead. That means whenever somebody requests this URL... www.domainname.com/folder/ test.php will be returned instead. In the person's address bar it will still read.. www.domainname.com/folder/ but if you look at the actual source code of the page it will be test.php. That is the power of mod_rewrite. mod_rewrite can also do a lot of other cool stuff with regular expressions. Do a search for mod_rewrite in Google to learn more. You can also control what files are interpreted as index files. For example, let's say I had a file "abc.html" that I wanted to be the index of a directory. That means whenever somebody types in... www.domainname.com/folder/ what I want to actually show up is... www.domainname.com/folder/abc.html but I want the address bar of their browser to still read... www.domainname.com/folder/ That is called the index file. You can do that by using the following command in your .htaccess file... DirectoryIndex abc.html index.htm index.html index.shtml index.php default.htm default.html Do a search for DirectoryIndex Directive in Google to learn more.