RSS Feed

Archive for the ‘htaccess’ Category

301 redirect Old domain to a New domain Using HTAccess

January 6, 2011 by admin No Comments »

Add the following code some where in your htaccess file: They are both similar but different approach depending on your likes!

Options +FollowSymLinks
RewriteEngine On
redirectMatch 301 ^(.*)  http://www.domain.co.uk/$1

OR

Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]

NB:
Please REPLACE www.domain.co.uk in the above code with your actual domain name.

 

Enforce WWW using HTACCESS file

November 22, 2010 by admin No Comments »

Open your htaccess file and under the line:
RewriteEngine On

Add the following line:

RewriteCond %{HTTP_HOST}   ^domainname.com     [NC]
RewriteRule ^(.*)          http://www.domain.com/$1  [L,R=301]
 

Securing your site with .htaccess file

September 10, 2010 by admin No Comments »

If you want to secure your site with a basic authentication using .htaccess file here are simple instructions on how to do it.

Get yourself to a .htaccess Password Generator site such as this dynamic drive

Copy the files (.htaccess and .htpasswd) files to your site folder.

All sorted!

 

Block directory browsing htaccess

April 19, 2010 by admin No Comments »

Block directory browsing:

IndexIgnore */*

 

Specify php.ini location htaccess

by admin No Comments »

Here is how you can tell .htaccess file the location of the php.ini file

create .htaccess file in your local root folder and add the following line somewhere on top

SetEnv PHPRC /[path-to-document-root]/

		        
 

Increase max_upload_size htaccess

by admin No Comments »

Create or add to the current .htaccess file in the document root directory.

# .htaccess

php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200