mod_rewrite

301 Redirect from Bare Domain to Full WWW Domain

apache

We recently set up Google Pagespeed Service for one of our WordPress sites. The site was setup with a “bare” domain name. That is, it had no subdomain. For example: http://healthfitnessexperts.com Google’s Pagespeed Service can’t handle bare domains. Like many content delivery networks (CDNs) and similar services, Pagespeed requires a subdomain like www. For example: [...]

Read the full article →

What is the Apache directive order of precedence?

apache

I am trying to implement some mod_rewrite RewriteRules using WordPressMU. I tried putting them in the Virtural Host file, but they did not appear to work. Since WPMU has a set of mod_rewrite RewriteRules in a .htaccess file, I wondered if the order of precedence was the problem. It seems that was indeed the cause. [...]

Read the full article →

How to debug Apache RewriteRule or mod_rewrite

apache

It’s hard to debug Apache RewriteRule (mod_rewrite) problems, especially when you have multiple rules. With applications like WPMU, it can be especially tough because WPMU may likely be doing it’s own RewriteRules. One trick is to turn on the rewrite log. To turn it on,try these lines in your .htaccess or virtual host file: If [...]

Read the full article →