Trying to redirect - too many redirects

(Mark) #1

Hi All,

I am quite a novice user but I am trying to redirect a proxy as below {
redir owncloud/index.php/login
proxy / {

I get the following

This page isn’t working redirected you too many times.


However, If I browse to another site that is the admin page which is displayed below and add it works below is the config for the cloudadmin {
proxy / {

Also If I change the proxy to the following {

proxy / {


I get thisNot Found

The requested URL /owncloud/owncloud/index.php/login was not found on this server.

(Matthew Fay) #2

Hi @pavili0n,

You’ve configured your redir to apply to all requests for You probably don’t want to do that, because you’re redirecting to, which has a redir which applies to all requests, which redirects the user… You see the problem?

You need to make sure you aren’t redirecting if the request matches where you sent them. I’m guessing you just want to make sure the client is in /owncloud, so try this on for size:

redir {
  if {path} not_starts_with /owncloud
  / /owncloud/index.php/login

(Mark) #3

@Whitestrake Matthew as always thanks so much for your help it is really appreciated. I see my mistake and your fix has helped me out I also had to remove the /owncloud from the proxy so it is now . proxy /

You are a real credit to this community!

(Matthew Fay) #4

Thanks! :smiley:

(Mark) #5

@Whitestrake can you help me with one further problem where the page won’t render / load the information. All I can see is the background how would I be best to diagnose that?

(Matthew Fay) #6

Try to access in the browser and see what comes up. Caddy’s just relaying exactly what it’s getting from up stream, so make sure that’s working fine. Clear browser caches etc. to make sure you’re getting the actual result.

(Mark) #7

Thanks again - I tested the IP on the server worked fine tested the link externally didn’t work tried external site on server did work guess its the cache :slight_smile:

(system) #8

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