Theme Amending Permalink
-
Hi
Upon activation, my theme is executing the following code:
//change permalinks to /%postname%/ global $wp_rewrite; //Write the rule $wp_rewrite->set_permalink_structure('/%postname%/'); //Flush the rules and tell it to write htaccess or IIS $wp_rewrite->flush_rules();
This works fine on a *nix web server, updating the rewrite rules in
.htaccess
but it doesn’t create the rewrite rules for IIS.Ok, maybe to do with permissions on the Windows machine?
Here’s the anomaly, when the permalink is updated from the permalink settings page, the rewrite rules are correctly set in the IIS
web.config
.MY QUESTION IS, with Windows IIS, how come the settings page updates the permalink type without a problem, yet the above code doesn’t (but does on *nix)?
Many thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Theme Amending Permalink’ is closed to new replies.