W3TC edit to my .htaccess broke the site
-
Hello,
Yesterday, my site suddenly stopped working, only generating 500 errors. My hoster told me that his logs show an error in the .htaccess file of my WordPress installation:
.htaccess: RewriteBase: argument is not a valid URL
I restored the .htaccess file from a backup I did a month ago and the site is now working again.
I compared the defect .htaccess with the current one and found that the single difference was this piece of code:
# BEGIN W3TC Page Cache core <IfModule mod_rewrite.c> ... RewriteBase ?lang=en ... </IfModule> # END W3TC Page Cache core
instead of the working
# BEGIN W3TC Page Cache core <IfModule mod_rewrite.c> ... RewriteBase / ... </IfModule> # END W3TC Page Cache core
I run a multilingual site through WPML, but I have not touched the redirect structure for different languages in over a year. The plugins were last updated several days ago; the only thing that I did when the .htaccess file was changed has been emptying the W3TC cache.
Why did W3TC change the .htaccess file in a way that made the whole installation inaccessible?
Regards,
Rafael
- The topic ‘W3TC edit to my .htaccess broke the site’ is closed to new replies.