Pages

Monday, April 1, 2013

How to redirect a WWW?

Step1:
Go to the path #/home/username/public_html

Step2:
vi .htaccess

Step3:

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

Awstat is not showing correct count for a particular domain

Run the below script for which the domain is affected.

#/usr/local/cpanel/base/awstats.pl -config=domainname.com

website appear’s to be loading slow?

Speed it up using gzip compress and mod_deflate. Add the following code in the .htaccess file under website folder, save it . Site should be loading pages significantly faster now!

### Enable gzip compression for PHP files
php_value output_handler ob_gzhandler

### compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

### End of compression code