Redir /questions https://somesite/ 302 doesn't work

Hello,

I’m trying to setup a redirect from our caddy site

https://gophercon.com/questions

To a different site. The URL above is the short url we want to give to GopherCon attendees next week.

At the moment I have this in our caddyfile

redir /questions http://dave.cheney.net/ 302

(the target url is just a test)

However if you hit

https://gophercon.com/questions

You just get a 404,

> GET /questions HTTP/1.1
> User-Agent: curl/7.35.0
> Host: gophercon.com
> Accept: */*
> 
< HTTP/1.1 404 Not Found
* Server Caddy is not blacklisted
< Server: Caddy
< Date: Thu, 07 Jul 2016 10:02:23 GMT
< Content-Length: 13
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host gophercon.com left intact

Can someone help me with the correct incantation.

Opps, turns out the configuration was correct but caddy was not restarted to pick it up due to a misunderstanding on how the config is pushed to the server.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.