Intercept and redirect url with custom port

Hello!

I’m trying to understand if I can solve my issue:

We deployed a new website on our server.
The old website was on a server with port 8081 open, the new server has that port closed.

What I need it so intercept and redirect requests to www.domain.com:8081/something and send them to other.domain.com/something, while keeping the regular requests (www.domain.com/something-else) to our current website.

Is this something I can achieve on Cloudflare?

Thanks!

Cloudflare’s proxy does not listen on port 8081 so you can’t receive that request in Cloudflare to do anything with it…

Thanks sjr!
On the documentation I found How to enable Cloudflare’s proxy for additional ports.
Do you think this could help?

The two options there are:

  • use “DNS only” to bypass Cloudflare, that would mean your origin needs to receive the request and handle the redirect, that’s no different to having the webserver on port 8081 as you had before.
  • use Spectrum - requires an Enterprise account plus Spectrum add-on so the cost will be very high for just doing a redirect.

The best you could do is just redirect the domain without the port and hope visitors find their way using that. (Cloudflare can redirect a domain to an origin on port 8081, so it would have been useful to do that before you moved things, but if you can’t open port 8081 on your origin any more, it’s too late to do that).

Ok thanks.
It seems this is not achievable, since my webserver has the 8081 port closed and Cloudflare isn’t helping without the Enterprise plan, which I agree is too pricey just to handle a redirect.

Thanks anyway!

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