[wp-trac] [WordPress Trac] #28737: 404 on custom permalink pagination caused by bad htaccess

WordPress Trac noreply at wordpress.org
Thu Jul 3 16:51:56 UTC 2014


#28737: 404 on custom permalink pagination caused by bad htaccess
--------------------------+-----------------------------
 Reporter:  nhumrich      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Permalinks    |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Seams this bug is lurking all over, but all have been marked as invalid,
 or problem not found.

 When using custom permalinks, using the next button (aka page 2, 3, etc.)
 causes a 404 error.

 Switching to default permalink structure fixed the problem.
 The error still happens when default theme is used, and all plugins are
 turned off.

 The error is due to the .htaccess file.
 The htacess file 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


 I have changed the htaccess file to the following and it fixed the
 problem. (AKA, here is the recommended patch)

 # BEGIN WordPress
 <IfModule mod_rewrite.c>
 ErrorDocument 404 /index.php?error=404
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>

 # END WordPress

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


More information about the wp-trac mailing list