12.3. Using regular expressions to improve URL Rewrite

Regular expressions (regex) is a topic that most web administrators avoid. The expression syntax can seem deep and complicated when you’re getting started. It’s like an onion: every layer takes you to a deeper layer. But to solve the common website redirection problems discussed in this section, you don’t need to go that deep.

A good way to think about regex patterns is as a filter. Only the data that passes the filter (regex pattern) will be handled by a rule. You may also find that you start to use regex for things other than those described in this chapter, such as searching IIS logs and other text files. PowerShell has a powerful regex implementation for that reason. Who knows? You may ...

Get Learn Windows IIS in a Month of Lunches now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.