Forum Moderators: phranque

Message Too Old, No Replies

Question on a URL address for my site

Help for URL question

         

malotron

7:07 pm on Aug 6, 2008 (gmt 0)

10+ Year Member



Hello All,

I am a new register of this site and have bookmarked this site for future reference as there is a plethera of helpful knowledge here.

I am the newby and a non-programmer. I have created a intercompany website that offers order forms, PDFs, documents, videos, etc. that each location might need for daily operations. The pages are in their own subdirectory and password protected.

The current URL for my associates to access the site is structured like this: www.example.com/directory/index.htm which takes them to the homepage for this intercompany page. My boss would like to make the URL address easier for the associates to remember and have it read like www.example.com/directory

If I type in the address like this now, I am asked for the userID and pass. Once entered, I'm shown the directory and all subdirectory and files that reside on the root. It doesn't take me to the homepage of this site.

I've browsed around and found multiple postings about editing the .htaccess file and adding code for mod_rewrite. However, each posting is unique and doesn't directly apply to my situation. When I downloaded the .htaccess file from the server and opened it in notepad, the only text that shows is "Options -Indexes" and nothing else showing on the page.

I've read that the file needs to be downloaded in ACSII and not Binary, but I cannot find anything within SmartFTP that allows me to change it. How do I know how it was downloaded?

I'm working with Windows and the site's server is a hosted server by a 3rd party company. So, I don't know if it is Linux based or what.

I know that this site is a teaching site and not a "here's your code, now go" which I respect. If anyone can offer assistance on my request, I'd appreciate it.

phranque

12:52 am on Aug 7, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], malotron!

it might be that your DirectoryIndex directive in the apache config hasn't specified the correct index file.
try copying index.htm to index.html and see what happens...

malotron

2:03 pm on Aug 7, 2008 (gmt 0)

10+ Year Member



Thanks for your reply phranque. I tried your suggestion and it doesn't make the change that I am trying to achieve. One question, is there a problem with saving the files as .HTM compared to .HTML? They seem to function either way, but I want to make sure I am doing it correctly.

I did go back to the server to look at the files and found a .htaccess file within the password protected subdirectory where this intercompany pages reside. In that dir, the .htaccess file has the following:

AuthType Basic
AuthName "restricted area"
AuthUserFile /data/15/1/127/3/1453492/user/1562062/htdocs/B-#*$!X/.access.pwd
AuthPam_Enabled off

require valid-user
Options +Indexes

Is there anything I can add here that would allow a person to type the URL as www.example.com/directory to get to the homepage of this intercompany site?