iis7_save_url_rewrite_rules [ WordPress Function ]
iis7_save_url_rewrite_rules ( No parameters )
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: iis7_add_rewrite_rule, save_mod_rewrite_rules, iis7_delete_rewrite_rule, iis7_rewrite_rule_exists, add_rewrite_rule
Updates the IIS web.config file with the current rules if it is writable.
If the permalinks do not require rewrite rules then the rules are deleted from the web.config file.
Source
<?php
function iis7_save_url_rewrite_rules(){
if ( is_multisite() )
return;
global $wp_rewrite;
$home_path = get_home_path();
$web_config_file = $home_path . 'web.config';
// Using win_is_writable() instead of is_writable() because of a bug in Windows PHP
if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) {
$rule = $wp_rewrite->iis7_url_rewrite_rules(false, '', '');
if ( ! empty($rule) ) {
return iis7_add_rewrite_rule($web_config_file, $rule);
} else {
return iis7_delete_rewrite_rule($web_config_file);
}
}
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- iis7_save_url_rewrite_rules() WordPress function reference ...
Updates the IIS web.config file with the current rules if it is writable. If the permalinks do not require rewrite rules then the rules are deleted from the web. config ...
queryposts.com - add_rewrite_rule() WordPress function reference, arguments and ...
flush_rewrite_rules() · iis7_add_rewrite_rule() · iis7_delete_rewrite_rule() · iis7_rewrite_rule_exists() · iis7_save_url_rewrite_rules() · save_mod_rewrite_rules() ...
queryposts.com - Docs for page misc.php
iis7_save_url_rewrite_rules (line 151). Updates the IIS web.config file with the current rules if it is writable. If the permalinks do not require rewrite rules then the ...
phpdoc.wordpress.org - #11995 (2.9.1 rc1 url rewrite rules constantly trying to re-add the ...
Code from the MU ticket: function iis7_save_url_rewrite_rules(){ global $ wp_rewrite; $home_path = get_home_path(); $web_config_file = $home_path .
core.trac.wordpress.org