[wp-trac] [WordPress Trac] #22798: Invalid URLs not giving 404 with "Default" permalink settings

WordPress Trac noreply at wordpress.org
Fri Dec 7 03:25:50 UTC 2012


#22798: Invalid URLs not giving 404 with "Default" permalink settings
---------------------------+------------------------------
 Reporter:  vanchuck       |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Rewrite Rules  |     Version:  3.4.2
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------------------
Changes (by vanchuck):

 * type:  defect (bug) => enhancement


Comment:

 Replying to [comment:5 dd32]:
 > I would argue this is a incorrect server setup.

 Aha. How this came about for my install was that I manually updated my
 .htaccess at some point, and when moving back to Default permalink option,
 the rewrites stayed, which as you point out, shouldn't be that way.

 However, if this is really an unhandled/unsupported config, two things
 would be helpful in this situation to avoid problems for others:
  - If .htaccess is not writeable by WP, there should be a warning message
 displayed when switching back to Default permalinks option, providing the
 user with the new updated .htaccess file contents (in this case, with no
 rewrite directives), as is done when you select a non-Default permalinks
 option
  - If Default permalinks option is enabled, .htaccess should be
 automatically (or user should be prompted to update it manually) to
 include a 404 handler to ensure wayward URLs still get sent to the WP
 error page. eg:
 {{{ErrorDocument 404 /index.php?error=404}}}

 Changing to Enhancement, will let you pros determine whether the above are
 worthwhile suggestions.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22798#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list