Veröffentlicht am 4 Kommentare

.htaccess on xampp for Windows

You need .htaccess on xampp for Windows.

Open a command line. Write there

C:\xampp\apache\bin>htpasswd -c -m -b c:\xampp\htdocs\.htpasswd username password

Create a .htaccess file and fill in it

AuthType Basic
AuthName "Access for restricted area"
AuthUserFile c:/xampp/htdocs/.htpasswd
require user username

Copy the .htaccess file to the directory you need the secured area.

Difference to your settings are: The path to the apache bin folder or htdocs folder on your xampp installation could be different. Change the above mentioned paths to your need.

The words „username“ and „password“ are only synonyms for real terms.

4 Gedanken zu „.htaccess on xampp for Windows

  1. dear buddy

    writting with problem which is q:- how to protect webdiretory and file when i upload file all in xampp localhost ( i want only to view only my webfile with pages but not view by other person who sit for hacking file )

  2. dear buddy

    writting with problem which is q:- how to protect webdiretory and file when i upload file all in xampp localhost ( i want only to view only my webfile with pages but not view by other person who sit for hacking file ) plz solve this

  3. dear buddy

    writting with problem which is q:- how to protect webdiretory and file when i upload file all in xampp localhost ( i want only to view only my webfile with pages but not view by other person who sit for hacking file ) solve it

    and mail me at given mail id to you

  4. Hi Arup, isn’t the htaccess approach working for you? And XAMPP is not designed for production environment, you should switch to something else.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.