bednee / cooluri

GIT repository for TYPO3 extension CoolUri
7 stars 12 forks source link

Consider HTTP statuscode 301 for all redirects #56

Closed mbrodala closed 7 years ago

mbrodala commented 7 years ago

Currently when opening an URL like http://example.org/foo CoolURI automatically redirects to http://example.org/foo/. (Mind the trailing slash.)

This happens with the default behavior of the PHP header() function for the Location header which in turn uses the HTTP statuscode 302 unless overridden.

Given that URLs without trailing slash are always only redirected this has some impact on SEO where these URLs are kept in the search index for revisiting.

Thus I'd like to suggest to have all of these redirects use HTTP statuscode 301 instead.

bednee commented 7 years ago

This commit should fix it: https://github.com/bednee/cooluri/commit/62e5021aca0cb770b83e05fc9938988340bc6af6

mbrodala commented 7 years ago

Thanks a lot. :-)