Blog: Links without trailing slashes are not redirecting correctly
Closed this issue · 1 comments
jayaddison commented
Describe the bug
Many of the links on the RecipeRadar blog point to web addresses on the blog that do not have a trailing slash. For example, the link to the 'engineering' tag from the first blog post points to:
https://blog.reciperadar.com/tags/engineering
Currently these do not seem to be redirecting correctly. The browser is pointed to https://blog/tags/engineering
, an incorrect URL.
To Reproduce
Steps to reproduce the behavior:
- Go to https://blog.reciperadar.com/
- Click on a link to any blog post tag
- Encounter incorrect redirect
Expected behavior
Users should remain on the https://blog.reciperadar.com
domain
Output of CURL (edited to remove IP addresses)
$ curl -vvv https://blog.reciperadar.com/tags/engineering
* Trying blog.reciperadar.com:443...
* TCP_NODELAY set
* Connected to blog.reciperadar.com (blog.reciperadar.com) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=reciperadar.com
* start date: Apr 2 20:02:26 2020 GMT
* expire date: Jul 1 20:02:26 2020 GMT
* subjectAltName: host "blog.reciperadar.com" matched cert's "*.reciperadar.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55d8d15c5da0)
> GET /tags/engineering HTTP/2
> Host: blog.reciperadar.com
> user-agent: curl/7.68.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 301
< date: Mon, 13 Apr 2020 15:54:21 GMT
< content-type: text/html
< content-length: 169
< location: http://blog/tags/engineering/
<
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.17.7</center>
</body>
</html>
* Connection #0 to host blog.reciperadar.com left intact
jayaddison commented
Resolved by #19