Title: [Plugin: W3 Total Cache] redirect error
Last modified: August 19, 2016

---

# [Plugin: W3 Total Cache] redirect error

 *  [madsurfer](https://wordpress.org/support/users/madsurfer/)
 * (@madsurfer)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/)
 * Hi,
 * I decided to switch from wp-super-cache to w3-total-cache due to all the great
   stories. But I am running into some problems with the redirects and I am hoping
   someone can help me with that.
 * My site consists of multiple wordpress installs. The .com is a regular install.
   And i run another wordpress install to show the dutch content on .com/nl (.nl
   redirects also to .com/nl).
 * After enabling w3 total cache the redirects are not function like they should.
 * [http://www.madwindsurfing.com](http://www.madwindsurfing.com) is redirected 
   properly to [http://madwindsurfing.com](http://madwindsurfing.com). (first install
   wordpress)
 * [http://www.madwindsurfing.nl](http://www.madwindsurfing.nl) and [http://madwindsurfing.nl](http://madwindsurfing.nl)
   is redirect to [http://madwindsurfing.com/nl/wp-content/w3tc/pgcache/_index.html.gzip](http://madwindsurfing.com/nl/wp-content/w3tc/pgcache/_index.html.gzip)
   instead of [http://madwindsurfing.com/nl](http://madwindsurfing.com/nl) (where
   the second wp install resides). This page will give an 404 error. The weird thing
   is that not all browsers do this. IE7 and mozilla are working correctly on win7
   and chrome is not.
 * How can i fix this?
 * —————————– htaccess .com ————
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Thread Starter [madsurfer](https://wordpress.org/support/users/madsurfer/)
 * (@madsurfer)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1650991)
 * Here is the htaccess for the .com (first wordpress install)
    [http://wordpress.pastebin.com/k5PGns3x](http://wordpress.pastebin.com/k5PGns3x)
 * Here is the htaccess for the .nl (second wordpress install)
    [http://wordpress.pastebin.com/UmSjZrjV](http://wordpress.pastebin.com/UmSjZrjV)
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651089)
 * I believe I replied to your support submission, make sure your redirect rules
   are at the top of your .htaccess file.
 *  [Rutger Groot](https://wordpress.org/support/users/rutgerg/)
 * (@rutgerg)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651216)
 * > Make sure your redirect rules are at the top of your .htaccess file
 * This fixed my issue. Many thanks!
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651231)
 * Ok cool.
 *  [joefletcher](https://wordpress.org/support/users/joefletcher/)
 * (@joefletcher)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651232)
 * Thanks! That fixed it for me, too. Was struggling forever on this.
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651249)
 * Glad to hear it.
 *  [DanMichel](https://wordpress.org/support/users/danmichel/)
 * (@danmichel)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651272)
 * How can we make sure the redirect rules are on the top when whenever we make 
   a change to W3 total access it automatically put it’s rewrites on the top? is
   there some php code we can use to tell it to put it on the bottom?
 *  [lrastart](https://wordpress.org/support/users/lrastart/)
 * (@lrastart)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651273)
 * I have the same problem as Dan.
 *  [bkoplin2](https://wordpress.org/support/users/bkoplin2/)
 * (@bkoplin2)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651274)
 * Hi,
 * i did exactly as You said and put usual WordPress htaccess rules at the top so
   my top looks like:
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule
   ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}!-
   d RewriteRule . /index.php [L] </IfModule> # END WordPress
 * and after that is all the rest of w3 total cache plugin htaccess rules. But it
   doesn’t resolve my problem. Stil have problems with www to non-www redirect. 
   My website is **[http://symbolika.net](http://symbolika.net)** (instaled as [http://www.symbolika.net](http://www.symbolika.net))
   and should be normalny with www but it doesn’t work properly.
 * Another website is **[http://przyslowia-cytaty.com](http://przyslowia-cytaty.com)**(
   should be [http://www.przyslowia-cytaty.com](http://www.przyslowia-cytaty.com)).
 * I checked it in Opera, FireFox, Internet Explorer nad 2 sites to redirection 
   check and it doesn’t work :/
 * What do I need to do with that? Please help.
 *  [lrastart](https://wordpress.org/support/users/lrastart/)
 * (@lrastart)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651275)
 * You need to have a redirect, first of all. With what you have there, there isn’t
   a redirect. Here is the generic rule you need… put this in the WordPress htaccess
   rule:
 *     ```
       RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
       RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
       ```
   
 * If you need https (I haven’t tried this one):
 *     ```
       RewriteCond %{HTTPS} off
         RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
         RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
   
         RewriteCond %{HTTPS} on
         RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
         RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
       ```
   
 * The problem is when you change a setting in W3TC, it diverts the WordPress rules
   back under the W3TC rules.
 *  [bkoplin2](https://wordpress.org/support/users/bkoplin2/)
 * (@bkoplin2)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651276)
 * damn, i thought that the default wordpress rule will work out but in some other
   configuration.
 * I spent all day to change it and try try and try… and it’s all for nothing.
 * Irastart You’re right! Thanks a lot for help : ) it works now.
 *  [lrastart](https://wordpress.org/support/users/lrastart/)
 * (@lrastart)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651277)
 * No problem. I use elegant themes too… their themes are great:
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651279)
 * The next release handles rules modifications better.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[Plugin: W3 Total Cache] redirect error’ is closed to new replies.

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * 13 replies
 * 7 participants
 * Last reply from: [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-w3-total-cache-redirect-error/#post-1651279)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
