Tag Archives: rewrite

Apache ProxyPass for WordPress master-slave setup

Simple way

Ensure certain traffic goes to a certain server (master), you can use this:


For a better setup with Variables, just follow the… following steps 🙂

Step One: Configure Environment

We need to setup some environment variables to get this to work correctly.
Add the following to your environment on the slave server(s):

RHEL/CentOS: /etc/sysconfig/httpdi

Ubuntu: /etc/apache2/envvars

Step Two: Configure your VirtualHost

In your VirtualHost configuration do something like the following.


Apache Rewrite rules

Rewrite rules examples:

This can be added in vhost configuration OR in .htaccess file

How to rewrite all web request on my site without www to www.domain.com


How to redirect all web requests on port 80 (or HTTP) to port 443 (HTTPS)


How to disable TRACE and TRACK methods on Apache


How to exclude mod_status from being rewritten by existing rules (placed before the problem rule)


How do I redirect all web requests on www.mysite.net/web to www.mysite.net/sect1/web


Rewrite all non-www to www


Force all URLs to be lowercase