skip to Main Content

Load configuration file just once – SEO

I'm working on my script to convert legacy links to seo friendly urls. index.php require 'AltoRouter.php'; $router = new AltoRouter(); $router->setBasePath('/router'); $urls = [ 'index.php?option=com_index&task=articles&id=1', 'index.php?option=com_index&task=articles&slug=1-article-title', 'index.php?option=com_index&task=articles.category&cid=100-category1', 'index.php?option=com_shop&task=products&slug=100-amazing-product', ]; foreach($urls as $i=>$url) { echo $router->getSefUrl($url); } AltoRouter.php ... public function…

VIEW QUESTION
Back To Top
Search