Redirects
Because the VIP Platform uses NGINX (not Apache), there are no .htaccess files. Redirects for URLs must be handled by alternative methods. The most suitable solution(s) for a site’s redirects should be chosen based on the amount and types of redirects needed.
- The Safe Redirect Manager plugin is a useful option for a small number of redirects (fewer than 250), and for redirects that will change frequently. Safe Redirect Manager also allows the use of wildcard or regex in redirects.
- To create redirects a large number of redirects (greater than 300) for old, or “legacy”, URLs that now return
404
HTTP response status codes, use the WPCOM Legacy Redirector plugin. - Some redirects can be written directly into a site’s theme code.
- It is not possible to configure redirects for uploaded assets residing within /wp-content/uploads/* . Requests for these assets are routed to the VIP File System directly, and the File System resides upstream from application code.
- To use more than one domain per site, set up vip-config.php to handle redirecting secondary domains to the desired primary domain for a site. This is particularly useful for mapping domains on a multisite, where redirects between non-
www
domains andwww
variants do not occur automatically.
Redirects with a 302
HTTP status are cached by VIP’s page cache for 1 minute, and redirects with a 301
HTTP status are cached for 30 minutes.