Compression is a simple and effective way to speed up your site. Modern browsers supports gzip compressed content and are capable of uncompressing gzip data into plain text.
The gzip module configuration depends on your Apache Server version:
Apache 1.3 uses mod_gzip while Apache 2.x uses mod_deflate.
mod_gzip configuration for Apache 1.3.x:
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
Share or Bookmark This Post With :
To avoid duplicate content problem with search engines, you have to redirect all pages to one common URL.
This you can achieve using mod_rewrite of apache and .htaccess.
To redirect any URL starting with www.domain.tld to domain.tld, you have to add the following code to .htaccess file.
Do a 301 redirect for all http requests that are going to the wrong url.
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC]
RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]
</IfModule>
or
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^domain.tld$ [NC]
RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
</IfModule>
To redirect domain.tld to www.domain.tld -
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.tld$ [NC]
RewriteRule ^(.*)$ http://www.domain.tld/$1 [R=301,L]
</IfModule>
or
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.tld$ [NC]
RewriteRule ^(.*)$ http://www.domain.tld/$1 [L,R=301]
</IfModule>
Share or Bookmark This Post With :
I was going through error log and saw this error in error log file. To solve this problem, In /etc/httpd/conf.d you will see a file entitled welcome.conf
It looks like this:
<LocationMatch “^/+$”>
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
Change it to this:
<LocationMatch “^/+$”>
Options Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
Just remove the hyppen(-) before the Indexes, that’s it. I hope this will solve your problem.
Share or Bookmark This Post With :
- Roundcube – Free browser-based IMAP client
- mtop – MySQL terminal based query monitor
- Kohana – Swift, Secure, and Small PHP 5 Fram...
- FormMail – free form processing PHP script
- Xataface – The fastest way to build a front-...
- dotProject – the Open Source Project Managem...
- The jQuery Form Plugin
- DocVerse has officially been acquired by Google
- HDGraph – a free tool for Windows to draw mu...
- RandomClass jQuery Plugin
- Send emails using PHPMailer an...
- Firefox Addons Essential for S...
- Free SEO Tools From SEOMoz.org...
- URL Rewriting for PHP Web Appl...
- Multiple Instances of Tomcat w...
- Apache 2.x + Tomcat 4.x + Load...
- Pagination in JSP/Java
- PHP – Mysql Open Source ...
- java.lang.OutOfMemoryError: Ja...
- HOW TO Subversion+Apache on Fe...




