When I add /blog
I don’t see any indication the post is missing. I simply see a blank page.
The URL is in fact returning a 502 Bad Gateway
as shown in developer tools
and cURL
% curl --compressed -svoL /dev/null 'https://superlative-semolina-4ae4f1.netlify.app/blog/posts/cyberwarfare-the-5th-domain-of-warfare/' 2>&1 | egrep '^(<|>)'
> GET /blog/posts/cyberwarfare-the-5th-domain-of-warfare/ HTTP/2
> Host: superlative-semolina-4ae4f1.netlify.app
> user-agent: curl/7.87.0
> accept: */*
> accept-encoding: deflate, gzip
>
< HTTP/2 502
< age: 0
< date: Wed, 29 Mar 2023 02:13:30 GMT
< server: Netlify
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-nf-request-id: 01GWNJ8HCANPTGQPACHM5DP1AQ
< content-length: 0
<
Ah okay, any clue how I can fix the 502 issues for any sub pages?
yep it is I am using the main domain for now since I dont want to take it offline until I have the proxy fully working.
hit the reply limit for some reason 
as I am still on cooldown
I tried what was suggested by nathan and now it puts to the right link but I still get a 502 error.
Is the blog post accessible when not accessed via the proxy?
1 Like
If you want the blog to be hosted under /blog/
you really should produce it so that it knows it is being hosted there, and thus produces all of its URLs to account for that situation. It’s something you would do in the configuration/code of that site.
You would either need to actually move it on the current live site though, or initially create a duplicate instance of the blog where it’s in effect.
Note that the single redirect that I supplied earlier will only redirect any requests made to /blog/
, it won’t automatically handle every request related to the blog site instance.
So with that site still believing it is hosted at the root, it’s generating URLs like /posts/
, /categories/
, /tags/
, /archives/
, which when viewed from the perspective of the main site simply don’t exist.
You could add additional proxies for those too, but it’d be a bit of a rabbit hole, much easier to build the site for the location it’s being hosted at.
2 Likes