1

I have two cakephp applications, cakephp.com and cakephp.in Based country IP how to redirect cakephp.com to cakephp.in. For Example if COUNTRY CODE is "IN" , then redirect to cakephp.in and COUNTRY CODE is not equal to "IN" then redirect to cakephp.com

Let me know is there any possibility to do the redirection.

Dollyh
  • 107
  • 7
  • Which version of CakePHP are you using? – Dave Apr 05 '16 at 14:51
  • You could check for the countrycode in the AppController `beforeFilter()` function. http://stackoverflow.com/questions/12553160/getting-visitors-country-from-their-ip , use that function to check for country code, and redirect to the correct domain. Be sure to flag that a redirect has occured aswell. – JazzCat Apr 05 '16 at 18:48
  • Cakephp version:2.5.2 – Dollyh Apr 06 '16 at 09:35
  • Please try something and describe what problems you've had with your shown-code. – AD7six Apr 28 '16 at 07:35

0 Answers0