Filtered IIS rewrite rules not added to web.config
|Reported by:||pat@…||Owned by:|
|Component:||Rewrite Rules||Keywords:||has-patch needs-testing|
If using IIS and web.config, appending rules via the filter 'iis7_url_rewrite_rules' will not add the filtered content if a rule for 'wordpress' already exists in the web.config file.
Even after WP has added its rule to web.config we should be able to influence the rules content in the web.config via the filter.
Steps to reproduce:
- Use a system running IIS that supports rewriting in the web.config
- Visit permalinks page so WP generates the 'wordpress' rule in the web.config
- Add a filter to 'iis7_url_rewrite_rules' and append the following rule: '<rule name="testrule" stopProcessing="true"><match url="readme.html"/><action type="Rewrite" url="foo.html"/></rule>'
- Visit the permalinks page
- Rule will not be appended to web.config file
- Repeat steps 1-3 above
- Remove the 'wordpress' rule from web.config file
- Visit permalinks page
- Filtered rule text will be present in this case
Change History (6)
- Keywords has-patch needs-testing added