Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Apache - Can I password protect all documents but one?


consafos

Recommended Posts

I have a site under development which is currently password protected by Apache using .htaccess. I would like to put up a holding page that would not be password protected, while keeping the rest of the site secure while I finish developing it!

 

Is this possible? All the documentation I've seen so far only allows you to protect whole directories, which is a problem because osCommerce is installed at the document root..

 

Thanks

Link to comment
Share on other sites

Just place the file that you dont want password protected in the main directory, this file wont be password protected, other the files in the sub-folders.

 

-Matt

Link to comment
Share on other sites

have you tried using:

 

<FilesMatch "*.php">

AuthName "Member Only"

AuthType Basic

AuthUserFile /html/username/.htpasswd

require valid-user

</FilesMatch>

 

then the outside world could browse html

 

you can use multiple directives of this to specify exactly what you want to block if you want

Link to comment
Share on other sites

Unfortunately all my files are already in the main directory, so I can't move the holding page to a higher directory..   any other ideas?

 

Copy all of the other files to a pssword protected sub-diretory, leave the holding page in the main directory and unpassword protect it.

 

-Matt

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...