Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Issue with htaccess.


Guest

Recommended Posts

Hello.

 

I seem to have an issue with htaccess.

 

If I load the directory in Internet Explorer then it correctly asks for a password,

but when I load the same directory in Firefox it doesn't ask for a password.

 

Which is weird because it used to previously so I don't know what the issue is.

(And yes I have cleared all the cache).

 

This is what the htaccess file looks like -

 

AuthName "Password Protected Area"

AuthType Basic

AuthUserFile /directory-goes-here/.htpasswd

AuthGroupFile /dev/null

require valid-user

 

Thanks.

Link to comment
Share on other sites

And I also read in the `How to secure your site' thread, the following recommendation :

 

Include the following code in your htaccess (Wont work with suexec but a php.ini version would suffice).

 

php_flag engine off

<Files ~ "\.(php*|s?p?html|cgi|pl)$">

deny from all

</Files>

 

I haven't added this code because I don't know if it's necessary or know what it does.

Link to comment
Share on other sites

And I also read in the `How to secure your site' thread, the following recommendation :

 

Include the following code in your htaccess (Wont work with suexec but a php.ini version would suffice).

 

php_flag engine off

<Files ~ "\.(php*|s?p?html|cgi|pl)$">

deny from all

</Files>

 

I haven't added this code because I don't know if it's necessary or know what it does.

this code would only go in an .htaccess file in your images directory, or another directory that no scripts are in. It would prevent any access to php, shtml, phtml, cgi, or pl files.

 

 

As for the Firefox browser not following the htaccess access rules, are you sure the . is in front of the htaccess? Are you always trying IE before you try FF? That should not matter but close down all windows. Even programs that you use to upload files with. One of them may identify as a mozilla browser and have already authenticated. Even your cPanel..Make sure no other program that accesses the site is active. Then try only FF and see if it still ignores the directory access controls.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Thanks it's working again.

 

I think I just had too many windows open so for some reason it wasn't clearing the cache properly.

 

Anyway what permission setting do you recommend for htaccess in sub-directories and in the root directory?

 

PS : And I take it it's recommended to add that code into the images directory's htaccess file?

Link to comment
Share on other sites

Thanks it's working again.

 

I think I just had too many windows open so for some reason it wasn't clearing the cache properly.

 

Anyway what permission setting do you recommend for htaccess in sub-directories and in the root directory?

 

PS : And I take it it's recommended to add that code into the images directory's htaccess file?

If one browser window that identifies itself as Mozilla is open and has authenticated, then any other window will assume the authentication. Only new threaded browser windows will have to be authenticated again.

 

 

And yes, that code is absolutely recommended in the image directory.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...