How to install IIS URL Rewrite Module on Windows Server 2016 & IIS 10

How to install IIS URL Rewrite Module on Windows Server 2016 & IIS 10

IIS URL Rewrite Module installation error IIS 10

When you start to play with Windows Server 2016 and IIS 10, you’ll get an error when you try to install the IIS URL Rewrite Module in IIS. The error “IIS version 7.0 or greater is required to install IIS URL Rewrite Module 2.” occurs because the URL Rewrite Module installer contains an invalid version check for the IIS being used. Here is how to install IIS URL Rewrite Module in IIS 10.

IIS URL Rewrite “Rewrite Module error: Expression contains a repeat expression”

The other day, I had to migrate a website from a Linux/Apache web server to Windows Server IIS. The website in question had a lot of sub domains, all pointing to folders within the web root using that same name. For this to happen we usually use an IIS URL Rewrite Module rule for one sub domain in a web.config file. However, this would mean I had to add and use that same rule some fifty times… Not good! This post describes how I simplified IIS URL Rewrite Module rewrites and used the value of the first condition as input for the second rewrite condition.

How to hide the .php file extension with IIS URL Rewrite Module

Sometimes it’s important to remove -or hide- the file extension of scripts you use. Security by obscurity might be that reason, if you don’t want others to know what script language you are using for your website, or for static site hosts. This example will hide the .php extension using IIS URL Rewrite Module, in a ready to use web.config & .htaccess example: extension less URLs in IIS.

RewriteProxy with .htaccess in IIS

Rewrite and proxy HTTP requests in IIS using a .htaccess. In my case scenario, I had to proxy requests in IIS, because a website was moved from web server A to B, and the DNS wasn’t updated yet. All HTTP requests for the moved website are handled in IIS’ Default Web Site; that’s the wildcard host, and the original host no longer existed there. We needed to match our website and proxy those requests to the new IIS web server. This can either be done using a proxy with IIS URL Rewrite, IIS Application Request Routing (ARR), or a .htaccess file handled by Helicon Ape.

IIS Outbound Rules with gzip compression

Microsoft Internet Information Services logo

Learn how to use URL Rewrite Outbound Rules in IIS, to offload content from a different server or host name. This way IIS with URL Rewrite acts as a reverse proxy. Add gzip compression to the mix, and this will improve website performance. In this post, I’ll also show you how to fix the URL Rewrite Module error “Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded (“gzip”).” in IIS.

Convert .htaccess to web.config

This post describes some of the IIS URL Rewrite Module web.config equivalents of commonly used Apache .htaccess settings. This is useful when you convert your Apache .htaccess to IIS web.config. The second part of this post outlines how to use Internet Information Services Manager to import and convert .htaccess rules to web.config.

3 Ways of blocking sendmail.php on IIS webserver

Access blocked

Here are 3 ways of blocking access to a PHP sendmail.php script on your Windows Server IIS webserver. This comes in handy if a websites on your webserver sends out spam and you need to block access to a script on a specific website or globally in IIS. You can use a web.config file for this purpose, and here is how.

Redirect HTTP to HTTPS

HTTPS for WordPress

In this post I provide you various HTTP to HTTPS redirection methods, for Windows Server IIS and Linux Apache. In web.config and .htaccess. Use these examples to your advantage to secure the traffic between your visitors and your website.