Jump to content

GEOIP Redirect instead 503


c64girl

Recommended Posts

Hi i have a question about PS 1.6 and GEOIP option build in it. Is there a way to change in some php file that people that are blocked and dont see folder are redirected to some site instead of 503 temporarily overloaded  error ?

Edit:

I found that FrontController.php is responsible and it load this file restricted-country.tpl

When i add below code it working but is there a way to use 301 instead of my fix ?

<meta http-equiv="REFRESH" content="0;url=http://www.google.pl">

Edited by c64girl (see edit history)
Link to comment
Share on other sites

Ok Found it in FrontController.php add this line that i have highlited

   /**
     * Displays 'country restricted' page if user's country is not allowed.
     */
    protected function displayRestrictedCountryPage()
    {
        header('HTTP/1.1 503 temporarily overloaded');
    Tools::redirect('http://somereeedirect.com');    
        
        $this->context->smarty->assign(array(
            'shop_name'   => $this->context->shop->name,
            'favicon_url' => _PS_IMG_.Configuration::get('PS_FAVICON'),
            'logo_url'    => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_LOGO'))
        ));
        $this->smartyOutputContent($this->getTemplatePath($this->getThemeDir().'restricted-country.tpl'));
        exit;
    }

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...