Skip to main content
Skip table of contents

Routing

Reverse Proxy Config

The reverse proxy handles incoming URL requests to VA.gov and is managed through a reverse proxy routing config file.

React Router

To use client side routing such as react-router, the react_routes section must be configured to ignore the route. For example, a React app running at www.va.gov/appPath would need this added:

CODE
  - path: /appPath
    protected: no

By default, one url path maps to one document. This configuration changes the default behavior so that any additional path parts after /appPath like /appPath/IntroductionPage will return the document at /appPath.

Server-side Redirects

To redirect from one URL to another, use the redirects section with a src, dest, and optional params such as:

CODE
  # Redirect /caregivers/introduction to /caregivers
  - src: /caregivers/introduction
    dest: /caregivers
    rewrite: permanent

  # Redirect various claim process and apply links
  - src: /disability-benefits/claims-process/ratings/
    dest: /disability-benefits/eligibility/ratings/

  # ==============
  # March 23, 2020: https://github.com/department-of-veterans-affairs/va.gov-team/issues/7104
  # ==============
  - src: ^/coronavirus-veteran-faq/?$
    dest: /coronavirus-veteran-frequently-asked-questions/
    matcher: "~*"

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.