#39866 closed defect (bug) (invalid)
faulty .htaccess file being created
| Reported by: | dutchovendoctor | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Rewrite Rules | Version: | 4.7.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
4.7.2 continually rewrites .htaccess file to the following content not compatible with Mozilla nor Explorer
# BEGIN WordPress
AddHandler application/x-httpd-php70s .php
<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>
Options -Indexes
<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|wp_woocommerce_session_) [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_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
The fix is to only use:
# 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>
Change History (5)
#1
@
9 years ago
- Description modified (diff)
- Summary faulty .htaccess file being created in → faulty .htaccess file being created
#2
follow-up:
↓ 4
@
9 years ago
- Component General → Rewrite Rules
- Description modified (diff)
- Focuses accessibility removed
- Milestone Awaiting Review
- Resolution → invalid
- Status new → closed
#3
follow-up:
↓ 5
@
9 years ago
@dutchovendoctor
If you can email or DM me directly about this issue.
#4
in reply to: ↑ 2
@
9 years ago
thanks. It's a Hostmonster packaged installation. I'll talk to them.
Replying to swissspidy:
Hey there,
By default WordPress really only creates these .htaccess rules.
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]Anything else is not standard WordPress stuff. In your example, like
ExpiresByTypeorRewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L]is caused by plugins. Most likely by theendurance-page-cacheplugin, which appears to be one installed on BlueHost, see https://github.com/bluehost/endurance-page-cache.
In this case, I suggest you to talk to your host about it.
In the future, the WordPress.org support forums at wordpress.org/support are better suited for questions like these.
Cheers!
#5
in reply to: ↑ 3
@
9 years ago
How can I help? It's an install using Hostmonster install tools.
I have only the Jetpack plugin installed.
Replying to lukecavanagh:
@dutchovendoctor
If you can email or DM me directly about this issue.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hey there,
By default WordPress really only creates these .htaccess rules.
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]Anything else is not standard WordPress stuff. In your example, like
ExpiresByTypeorRewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L]is caused by plugins. Most likely by theendurance-page-cacheplugin, which appears to be one installed on BlueHost, see https://github.com/bluehost/endurance-page-cache.In this case, I suggest you to talk to your host about it.
In the future, the WordPress.org support forums at wordpress.org/support are better suited for questions like these.
Cheers!