bluehost / endurance-page-cache

Other
24 stars 11 forks source link

.htaccess edits cause wp-login to endlessly redirect to itself? #19

Open singpretty opened 7 years ago

singpretty commented 7 years ago

HostMonster added Endurance to must-use on my various Wordpress installations. Now, I find I can't log into 5 out of 7 of my Wordpress sites normally.

The login screen appears correct, but when I submit my user/password, the page just reloads as a blank login screen once again. (I wondered if it had nonetheless logged me in, but when I tried opening the site in a new tab, I was not logged in.)

Trying to use the "forgot password?" link causes a similar reload (no link is sent). Entering a wrong user/password combo also causes a reload, with no error message. (You can try it on this one for example: jeannelemlin.com/wp-admin)

I decided to rename my .htaccess file to take it out of the equation. Doing so, for each affected site, fixed the login pages!

Since the entire contents of the latest .htaccess file seem to belong to Endurance Page Cache, I suspect it is at the root of the problem. Appreciate your help! Pasting here:

# BEGIN WordPress
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^/wp-content/endurance-page-cache/ - [L]
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP_COOKIE} !(wordpress_test_cookie|comment_author|wp\-postpass|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond %{DOCUMENT_ROOT}/wp-content/endurance-page-cache/$1/_index.html -f
    RewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L]
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/javascript "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 1 weeks"
</IfModule>
<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
# Set PHP handler to application/x-httpd-php5s on Fri Nov 13 19:25:16 MST 2015.
AddHandler application/x-httpd-php5s .php
TomClive commented 7 years ago

Yep, we've just had the same issue and it's very poor from Bluehost. This change was made without notification and it took down the website during a critical week for the project. No access to admin area either.

I just replaced the new htaccess with the default htaccess from Wordpress Codex and deleted the endurance plug-in. https://codex.wordpress.org/htaccess