[wp-trac] [WordPress Trac] #39866: faulty .htaccess file being created in

WordPress Trac noreply at wordpress.org
Mon Feb 13 20:46:23 UTC 2017


#39866: faulty .htaccess file being created in
-----------------------------+-----------------------------
 Reporter:  dutchovendoctor  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  General          |    Version:  4.7.2
 Severity:  normal           |   Keywords:
  Focuses:  accessibility    |
-----------------------------+-----------------------------
 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 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>

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39866>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list