Category | Apache

Have a problem with mod_rewrite rules? Debug it !

Posted on 09 March 2010

Many webmasters run in to mod_rewrite at one time or another and every one of them will have at least a little trouble with it. I just came across the RewriteLog Directive and corresponding RewriteLogLevel Directive.

Tags: , , ,

Rewrite subdomain to folder

Posted on 17 February 2010

You might have noticed some sites having their URLs written as if they were different subdomains of the same domain.

Tags:

10 Mod_Rewrite Rules You Should Know

Posted on 30 January 2010

Turn Mod_Rewrite On Mod_rewrite is used through your .htaccess file. Place the following code at the beginning of your .htaccess file to turn mod_rewrite on:

Mod Rewrite Cheat Sheet

Posted on 30 January 2010

Mod_Rewrite Cheat Sheet, a quick reference guide for mod_rewrite, with rewrite flags, regular expression syntax and sample rules. download mod_rewrite cheat sheet in pdf download mod_rewrite cheat sheet in png Regular Expression Syntax URL Rewriting with mod_rewrite depends a great deal upon a solid knowledge and understanding of regular expressions. The “RewriteRule” uses regular expressions [...]

mod_deflate alternative way for css and javascript through mod_rewrite rules

Posted on 20 January 2010

This method is probably the best method to overcome the mod_deflate issue and we are only concerned about javascript and css files for now. What we need to do is gzip all our javascript & css files. (Note: PHP has an easy method to compress php files on the fly). You have to have shell [...]

Tags: , ,

Compress html output, css & javascript with mod_deflate module in Apache 2

Posted on 20 January 2010

.htaccess configuration Normally be able to enable mod_deflate module for Apache2 safely with the following lines inside your .htaccess file in your www root of your website: Virtual Host Notes Some people argue that configuration in the VHost is better because it saves your server the disk IO of accessing the .htaccess file with every [...]

Tags: , , ,

Tricks to disable rules

Posted on 19 January 2010

1 Disabling Mod_Security Globally 2 Disabling Mod_security per domain 3 Disable Mod_security on a global URL 4 Disable a Mod_security rule (or rules) for all applications in a single domain 5 Disable Mod_security rule for a specific application in a single domain 6 Disable Mod_security rule for all domains 7 Disable Mod_security rules globally for [...]