Archive for htaccess

force http to https

Sometimes you may need to force your website visitors to browse your site over a secure SSL connection.
An easy to way to always redirect the user to secure connection. (https://) can be accomplished with a .htaccess file containing the following lines:
In this example I have used bizante.com but you can change to your own [...]

Read more

configuring mod_auth_mysql

This is what I placed in my .htaccess file to configure mod_auth_mysql
associated table and field names required in mysql database
php_value magic_quotes_gpc On
AuthType Basic
AuthName “Restricted Access”
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLDB databasename
AuthMySQLUserTable admin_users
AuthMySQLUser dbuser
AuthMySQLPassword dbpassword

require valid-user

Read more

Introduction

What is .htaccess?
In most linux web servers, .htaccess (hypertext access) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration.
The original purpose of .htaccess was to allow per-directory access control but, nowadays .htaccess can override many other configuration settings.

Read more

Change your default directory page

This is a command which allows you to specify a file that is to be loaded as your default page whenever a directory or url request is received
DirectoryIndex filename.html
This would cause filename.html to be treated as your default page, or default directory page.
You can also append other filenames to imply an order of preferance.
DirectoryIndex filename.html [...]

Read more