Sysadmins of the North

Technical blog, where topics include: computer, server, web, sysadmin, MySQL, database, virtualization, optimization and security

Tag: URL Rewrite (Page 1 of 2)

Tips to speed up WordPress, serve gzip compressed static HTML files

Who said WordPress is slow on Windows Server IIS? Gzip compress and serve WP-Super-Cache or Cache Enabler static HTML files, to supercharge your WordPress blog. Here is how to serve gzip compressed HTML files through Windows Server IIS: create smaller, compressed, static HTML files, that are downloaded faster. This works with WP-Super-Cache and Cache Enabler on IIS!

Read More

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

When you start to play with Windows Server 2016 and IIS 10, you’ll receive an error when you try to install the IIS URL Rewrite Module in IIS. The error 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

Read More

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

Fix the URL Rewrite error "Rewrite error: Expression contains a repeat expression" on Windows Server IIS.

Read More

RewriteProxy with .htaccess in IIS

Rewrite and proxy HTTP requests in IIS. In my case scenario, I had to proxy requests on 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 URL Rewrite, IIS Application Request Routing (ARR), or a .htaccess file handled by Helicon Ape.

Read More

add_rewrite_rule() accepts an array of query vars in WordPress 4.4

John Blackbourn writes to Make WordPress Core that a small change to add_rewrite_rule() in [34708] means that in the upcoming WordPress 4.4 an array can be passed as the second parameter instead of a query string…

Read More

How to block BaiduSpider bot User-Agent

The Baidu spider (BaiduSpider user agent) can be a real pain to block, especially since it does not respect a robots.txt as it should. The following IIS URL Rewrite snippet blocks the Baidu spider based on its User-Agent string.

Read More

How to enable HTTP Strict-Transport-Security (HSTS) on IIS

Set up HTTP Strict-Transport-Security (HSTS) in Windows Server IIS. Scott Hanselman wrote a great post on how to enable HTTP Strict-Transport-Security (HSTS) on IIS web servers, and here is some more technical information about HSTS in IIS (and other security headers)

Read More

How to redirect HTTP to HTTPS on IIS

An HTTP to HTTPS redirect on IIS is often better left to the web server, with a simple httpRedirect redirection, than to a resource expensive URL Rewrite. Where possible, use the IIS httpRedirect element for IIS HTTP to HTTPS redirection, and here is how:

Read More

Umbraco: Route example.com to www.example.com

URL Routing in Umbraco, how to redirect your website hostname in Umbraco from https://example.com to https://www.example.com.

By default, Umbraco listens to both http://example.com and http://www.example.com. This is not good for your Google ranking and SEO, since this will be seen as duplicate content. Fortunately, it is pretty easy to redirect your website to it’s www variant. Here is how to accomplish this.

Read More

Microsoft Internet Information Services logo

Remove IIS Server version HTTP Response Header

Remove HTTP response headers in IIS 7, 7.5, 8.0, 8.5, 10 and ASP.NET

Windows Server IIS loves to tell the world that a website runs on IIS. It does so with the Server header in the HTTP response, as shown below. In this post I’ll show you how to remove response server headers in IIS. You don’t want to give hackers too much information about your servers, heh? ;-).

Read More

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

How to hide the .php file extension with URL Rewrite on Windows Server IIS? Sometimes it’s important to 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. This example will hide the .php extension using the IIS URL Rewrite module, in a ready to use web.config & .htaccess example.

Read More

IIS Outbound Rules with gzip compression

Saotn.org uses used URL Rewrite Outbound Rules in IIS, to offload content from a different server and/or host name. This should improve website performance. Just recently I noticed Outbound Rules conflicted with gzip compressed content. I started noticing HTTP 500 error messages: Outbound rewrite rules cannot be applied when the content of the HTTP response is encoded ("gzip").. Here is how to fix that error.

Read More

Create your own CDN using IIS Outbound Rules

Create a Content Delivery Network (CDN) using IIS Outbound Rules, to offload your static content and speed up your website with these tips. Offloading content is important for the performance of your website, because then content is downloaded in parallel and thus faster. A faster website attracks more visitors, is more user friendly, improves CTR and Google SEO. You can use these IIS Outbound Rules to offload javascript and CSS stylesheets.

Read More

Boost Drupal performance with Boost

Boost Drupal performance on Windows Server IIS. Besides WinCache on IIS, you can improve Drupal’s performance by installing the Drupal BOOST module. For this module to work you need to disable Drupal’s own caching mechanism, and you need access to the server variable CONTENT_TYPE in URL Rewrite. Here is how…

Read More

WordPress 3.5 on IIS 8.0 is unable to save a web.config file

This website Saotn.org is hosted on Windows Server 2012 with IIS 8.0 with WordPress for a few months now, and everything is running very smooth. And I would never hit this bug because I don’t need to change my permalinks structure, or save any other plugin setting which would want write to a web.config file. One of my colleagues on the other hand, just moved his website to one of our IIS 8.0 web servers and he noticed he couldn’t save his Permalinks structure in the IIS web.config file. This can be pretty annoying 😉 Quick fix attached…

Read More

Page 1 of 2

Powered by WordPress & Theme by Anders Norén