Redirects
Because the VIP Platform uses NGINX (not Apache), there are no .htaccess
files. Redirects for URLs must be handled with alternative methods. The most suitable solution(s) for a site’s redirects should be chosen based on the amount and types of redirects needed.
- Redirects with a
302
HTTP response status are cached by the page cache for 1 minute, and redirects with a301
HTTP response status are cached for 30 minutes. - Some redirects can be written directly into a site’s theme code. However, there are some limitations on redirects for static files that should be considered. Notably, redirects cannot be configured for any URLs that include
/wp-content/uploads/*
. - To use more than one domain per site, set up
vip-config.php
to redirect secondary domains to a desired primary domain. This is particularly useful for mapping domains on a multisite, where redirects between non-www
domains andwww
variants do not occur automatically.
WordPress plugins for handling redirects
- The Safe Redirect Manager plugin is useful for managing a small number of redirects (up to 1,000 by default with options for customization). Safe Redirect Manager also allows the use of wildcard or regex in redirects.
- The WPCOM Legacy Redirector plugin is designed for managing a large number of redirects (greater than 300) for inactive legacy URLs that now return a
404
HTTP response status code.
Last updated: December 20, 2024