Archive

Archive for the ‘.htaccess’ Category

Create .htaccess file on a WAMP System

March 8th, 2010 admin No comments

If you are creating a new passwd file:

 C:\wamp\bin\apache\Apache2.2.11\bin\htpasswd.exe -c passfile username

If your are editing and existing password file:

 C:\wamp\bin\apache\Apache2.2.11\bin\htpasswd.exe passfile username

.htaccess contents:

AuthType Basic
require valid-user
Satisfy all
AuthUserFile C:/webroot/passwdfile
AuthName "My Secret Folder"

Move the created pass file to the desired location. and add a .htaccess file to the folder you want to protect and then gracefully restart apache.

This is done through the wamp system tray icon.

Categories: .htaccess Tags:

Create .htaccess restricted login

December 9th, 2009 admin No comments

Go here http://tools.dynamicdrive.com/password/

Categories: .htaccess Tags:

Process .html as PHP

April 9th, 2009 admin No comments

To setup a Linux server running Apache web server to process .html (.htm) files as PHP. create an .htaccess file in the root folder of your website and add these lines to the .htaccess file:

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html

Source: http://www.lgr.ca/blog/2007/02/process-html-as-php.html

Categories: .htaccess, php Tags: