onklmaps Posted October 12, 2018 Share Posted October 12, 2018 I am building an api for my PrestaShop module using a module FrontController. class mymoduleModuleFrontController extends ModuleFrontController { public function init() { echo "Hello world"; } } The controller runs fine under mydomain.com/index.php?fc=module&module=mymodule&controller=api However.. When I change shop domain to for example mynewdomain.com, PrestaShop automatically redirects me from mydomain.com/index.php?fc=module&module=mymodule&controller=api to mynewdomain.com/index.php?fc=module&module=mymodule&controller=api. How can I disable automatic redirect for a PrestaShop ModuleFrontController? I even tried to make it independent of the PrestaShop controller-system by accessing a PHP-file in my module-dir: require_once(dirname(__FILE__).'/../../config/config.inc.php'); require_once('mymodule.php'); Even that last approach redirects me to the new domain. Is there any way to disable PrestaShop redirects for a script? Link to comment Share on other sites More sharing options...
Rolige Posted October 12, 2018 Share Posted October 12, 2018 I don’t know what are you expecting, of course if you move your shop to another domain, of course that the controller now will works in this new domain. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now