Skip to content

Instantly share code, notes, and snippets.

@MattLoyeD
Created June 22, 2020 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattLoyeD/196a3da26a5c60845e7d8578a5280f26 to your computer and use it in GitHub Desktop.
Save MattLoyeD/196a3da26a5c60845e7d8578a5280f26 to your computer and use it in GitHub Desktop.
This file is a workaround in case of Magic Redirect not working on some custom implementations.
<?php
class FrontController extends FrontControllerCore
{
public function init()
{
if (Module::isInstalled('magicredirect') && Module::isEnabled('magicredirect')) {
require_once _PS_MODULE_DIR_.'magicredirect/magicredirect.php';
$mod = new MagicRedirect();
$mod->catchUrls();
}
return parent::init();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment