Redirections

Common redirection rules for Safe Redirect Manager.

Redirect the whole site to a new domain keeping the path, but redirect the homepage to a different destination #

Redirect homepage screenshot

Remove .html extension (and append an ending slash “/”) #

This is the configuration to set on Safe Redirection Manager:

  • ^(.*)\.html$
  • Enable Regular Expressions (advanced): Enabled
  • https://mightyminnow.com/$1/
    It’s important to use the site domain, if you only use /$1/ it will take you to wp-admin for a weird reason.
  • 301 Moved Permanently or 307 Temporary Redirect

Remove .html extension including query parameters #

It is not possible to include the query parameters on WP Engine, because it removes the query string from $_SERVER[‘REQUEST_URI’] for non logged-in users due cache.

Safe Redirection Manager uses the $_SERVER[‘REQUEST_URI’] to process the redirection, so, the redirection would work fine for logged-in users, but not for non logged-in users.

Just for documentation, this would be the settings to include include the query parameters on the redirection (they can be useful in other servers):

  • ^(.*)\.html\?(.*)$
  • Enable Regular Expressions (advanced): Enabled
  • https://mightyminnow.com/$1/?$2
    It’s important to use the site domain.
  • 301 Moved Permanently or 307 Temporary Redirect

Powered by BetterDocs

Newsletter

Subscribe and stay connected through our Newsletter. We send out important news, tips and special offers.

  • This field is for validation purposes and should be left unchanged.