htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: protect all but one - when user type just domain name
PostPosted: 11 Sep 2008 15:10 
Offline

Joined: 11 Sep 2008 14:54
Posts: 1
Hello everyone!

Here's what I want in few simple steps.

1) I am developing a site and I do not want anyone to see it - that is why I have secured it with a password using htaccess.

2). I created a welcome screen' - single page with 'cooming soon' etc. and I want only this page to be available to everyone - I managed to get this working as well.

3). Name of this page is index.html and I want it to display when
someone visit my site.

this is how my .htaccess looks like now:

Code:
   <Directory "/var/www/vhosts/mydomain.com/httpdocs">
      <Files index.html>
      order allow,deny
      allow from all
      Satisfy Any
      </Files>
      
      AuthType Basic
      AuthName " "
      AuthUserFile /var/www/vhosts/mydomain.com/pd/pwd
      require  valid-user
   </Directory>



At the moment, when one type http://www.mydomain.com/index.html -> the page is displayed to the user and it does not ask for password (exactly as I wanted). BUT - when one type http://www.domain.com - then it asks for the password.

I though that when you type just the domain name, the directory index is displayed - index.html in this case - index.html is not password protected so why it keeps asking for password?

Basically, I want both http://www.mydomain.com and http://www.mydomain.com/index.html to be unprotected (and other files and directories protected).

How I can achieve this?
Many thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB