Opened 18 years ago
Closed 18 years ago
#4018 closed defect (bug) (fixed)
wp-rewrite/save_mod_rewrite_rules doesn't clean up after itself
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.1.2 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
when going back to the default URL scheme after using some sort of mod_rewrite permalinks, permalink_structure
is emptied, everything works as expected;
however, the rewrite rules are not cleared from .htaccess
, since save_mod_rewrite_rules
relies on permalink_structure
being not empty and will abort silently, causing all non-existent locations to be redirected to Wordpress, which may or may not be what the user wants (supposedly if they don't want mod_rewrite
permalinks they'll also rely on the server to handle 404, etc)
The fix is a one-liner actually :)
Attachments (2)
Change History (6)
#1
@
18 years ago
- Owner changed from anonymous to westi
- Status changed from new to assigned
-1 to this fix.
We need to make the behaviour of save_mod_rewrite rules more obvious.
I'm attaching a new patch which makes the behaviour more explicit and adds some documentation.
Please test.
#2
follow-up:
↓ 3
@
18 years ago
works here as expected (trunk, r5795), but gathering everything in a gigantic expression doesn't really help readability
+0
#3
in reply to:
↑ 2
@
18 years ago
- Keywords commit added
Replying to m0n5t3r:
works here as expected (trunk, r5795), but gathering everything in a gigantic expression doesn't really help readability
The point behind merging the current checks into the "gigantic expression" and including the comment on how the function works and what exactly we are trying to achieve and improve the maintainability of the code.
fix for save_mod_rewrite_rules