This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

ASPX WebRequest Rewriter

Description

Fed up with IIS not providing permalinks? Don’t have access to the IIS control panel on your host? Then wp-aspxrewriter is for you!

Allowing URLS such as: http://www.pynchon.net/discourse/2008/03/06/24/two-amusing-pynchon-posts.aspx this is the easiest way to enable completely pretty permalinks on IIS 6 or IIS 7.

Screenshots

  • wp-aspxrewriter in action

Installation

The plugin consists of two components:

  1. A standard WordPress plugin.
  2. An ASP.NET HttpModule.

To install:

  1. Upload the wp-aspxrewriter folder to the /wp-content/plugins/ directory
  2. Upload the URLRewriteModule to your IIS /bin/ directory
  3. If you are using WordPress 2.3 or 2.4, modify your source code to contain the additional hook that is implemented at https://trac.wordpress.org/ticket/5969 that will feature in 2.5. Hint: it’s in function get_pagenum_link.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress
  5. Create your desired permalink structure on Options -> Permalinks, ensuring that it ends with .aspx.

eg. /%year%/%monthnum%/%day%/%post_id%/%postname%.aspx

Recommended bases are:

/word-category /word-tag

  1. Navigate to Manage -> ASPX Rewriter in the admin control panel and copy the setup that is shown
  2. Modify or create a web.config file that contains the following under <configuration>:

replacing all the values in <RewriterRules> with the configuration generated by you in stage 6.

Add the following line to

  1. Add the following to your web.config under <system.web>:

IIS7: <system.webServer>

</system.webServer>

IIS6:

  1. Try it out!

FAQ

How does it work?

That depends on which version of IIS you are using.

In IIS 6 without Integrated Pipeline mode, the request comes in, is matched by the engine which then makes a web request to the correct php page. In IIS 7 proper path rewriting is done and the PHP handler is invoked by IIS.

It doesn’t work with my plugin!

Get in touch and I’ll see what I can do to fix it. This is an early release and has worked in the situations I’ve tested, I can’t guarantee it will in all circumstances.

Contributors & Developers

“ASPX WebRequest Rewriter” is open source software. The following people have contributed to this plugin.