skip to Main Content

i tried using the .htaccess to protect a folder but each time i tried to login through the browser, it displays this *****Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache/2.4.33 (Win32) PHP/5.6.35 Server at localhost Port 80 ****

i dont know if the problem is from my httpd conf in apache

This is my .htaccess
*** AuthUserFile “c:/wamp/www/site/site/.htwebsite”
AuthName “Admin only”
AuthType Basic

require valid-user



.htwebsite

admin:$apr1$CpeOKwE0$nbfV5DOxvjvBGyEktBbdgr


2

Answers


  1. create .htacces inside yuor folder and put this lines inside it

    RemoveHandler .php .phtml .php3
    RemoveType .php .phtml .php3
    

    this lines protect your directory to run any php files
    this is good for user uploads folder

    Login or Signup to reply.
  2. Add .htaccess file to your folder: /website/folder/.htaccess And add this line into it:

    Deny from all
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search