Forum Moderators: phranque

Message Too Old, No Replies

301 Redirecting to Reverse Proxied Pages - Possible?

Can you 301 redirect a page to another page that is being reverse proxied?

         

mirabile

8:24 pm on Jan 27, 2012 (gmt 0)

10+ Year Member



We have a client that is going through a redesign. Due to provider constraints, we will be using a reverse proxy to make it look like the blog will continue to be at www.domain.com/blog instead of blog.domain.com.

In other words, although we're being forced to move the blog to a subdomain, the reverse proxy will make it appear that no domain changes have actually occurred.

(See also: [seomoz.org...]

In the meantime, we also need to perform a few 301s. Ex:

www.domain.com/oldblogurl => www.domain.com/newblogurl

HOWEVER: the "actual" home of the URL is really blog.domain.com/newblogurl, but the reverse proxy makes it look like www.domain.com/newblogurl

www.domain.com/oldblogurl => www.domain.com/newblogurl (but this is REALLY blog.domain.com/newblogurl)

Can we still configure a 301 redirect for this, or does the reverse proxy add an extra layer of DNS complexity to make this impossible?

I am no expert on DNS issues so I appreciate any advice you can offer.

g1smd

8:33 pm on Jan 27, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Redirects are between the browser and the server. Redirects work with URLs "out there" on the web.

Your proxy works inside the server and has a public URL for access but the inner workings of a proxy are hidden in the same way that the inner workings of a rewrite are hidden.

Since they are two separate things, you can configure each almost independently. I say "almost" because the redirected-to URL has to match up with the expected URL that will be requested when the proxy is to kick in and fetch content from elsewhere.

The subdomain URL should return a redirect to the canonical folder URL when direct access is attempted and should deliver content when a proxied request is received. Requests for the folder URL should be proxied and should add the "x-forwarded-for" headers so that the subdomain can identify proxied requests.

mirabile

9:13 pm on Jan 27, 2012 (gmt 0)

10+ Year Member



Thank you so much for clarifying this and for the quick response. Makes total sense. We appreciate it!