-1

I have my news website hosted in US and it is being managed by cloudfare. I have placed one local server in Nepal as well for faster serving of web pages. MYSql replication and web content sync is being done.

My requirement: As news editor uploads content in that news website, I want that to be written only in US server as it ultimately gets replicated to local server. To meet this requirement, I have configured htaccess in local server to redirect all request coming to /public_html/login or /public_html/cms to US server. It's working. But as you know cloudfare has CDN features so request coming from my country or nearby my country will be redirected to my local server via cloudfare. Hence, I am facing too many redirection issues while browsing my newssite login page and cms page as I had configured redirection in .htaccess file (local server). Because editor hits newswebsite CMS page and they will be redirected to US server and again it will be redirected to local server, so there is a loop generated. (Geographical Location CDN)

How can I resolve this issue ? I think questions looks a bit messy but please try to understand. :-)

Anand Shrestha
  • 41
  • 4
  • 12

1 Answers1

0

ProxyPass to the proper backend url instead of redirecting to it via HTTP 301/302.

kubanczyk
  • 13,502
  • 5
  • 40
  • 55