department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

mod rewrites should use 301 not 302 #47375

Open swirtSJW opened 2 years ago

swirtSJW commented 2 years ago

Issue Description

Currently when a request is made for path on va.gov like this one "https://www.va.gov/education/how-to-apply" there is a rewrite of the url to make it "https://www.va.gov/education/how-to-apply/" because that route is what serves the index.hml file that mimics the look of a path based site. The rewrite, which is also a redirect, should return a 301 "permanently moved" not a 302 "temporary move". This does have some SEO impact and also triggers some semi-false alarms in some site scanning tools.

Currently it returns a 302 image

Related Slack thread


Tasks

Acceptance Criteria

swirtSJW commented 1 year ago

Interesting and possibly related https://stackoverflow.com/questions/30090254/aws-s3-forces-302-redirects-when-url-has-no-trailing-slash-need-301s