How to add cononical tag in opencart

We have found the way to add the canonical tag on OpenCart website in a easy way…

First we find the catetory.php file from the category folder

catalog/controller/product/category.php file

Find this line:

if ($category_info) {

and add the following lines after that

$can_url=$this->url->link("product/category","path=".$this->request->get[‘path’]); $this->document->addLink($can_url,”canonical”);

Second we find the catalog controllers file


Find this line:


and add the above code after that

$can_url=str_replace(‘index.php?route=common/home’, ”, $can_url);

How to remove index.php from URLs in Joomla

To enable Use URL rewriting in Joomla, you should do the following:

  • Log into your Joomla dashboard.
  • In the left menu, click on the Global Configuration link under the SYSTEM tab.
  • There are several tabs at the top of the page. If you are not on the Site tab, click Site.
  • On the right side of the page, find theSEO Settings.
  • Set Use URL rewriting option to Yes.

You should enable Use URL rewriting in Joomla 3.x. and rename htaccess.txt to .htaccess.

htaccess Tricks

Welcome to Perishable Press! This article, Stupid htaccess Tricks, covers just about every htaccess “trick” in the book, and is easily the site’s most popular offering. In addition to this htaccess article, you may also want to explore the rapidly expanding htaccess tag archive. Along with all things htaccess, Perishable Press also focuses on(X)HTML, CSS, PHP, JavaScript, security, and just about every other aspect of web design, blogging, and online success. If these topics are of interest to you, I encourage you to subscribe to Perishable Press for a periodic dose of online enlightenment 😉

We got this blog from for blog more information Click Here


How can I make a dynamic canonical tag on Magento

We generally recommend to hide internal site search from getting indexed


Add this code:

// code for show canonical tag on all page
$current_url = Mage::helper('core/url')->getCurrentUrl();
$url2 = substr($current_url, 0, strpos($current_url, '?'));
if(!empty($url2)) {
<link rel="canonical" href="<?php echo $url2; ?>" />
<?php } else { ?>
<link rel="canonical" href="<?php echo $current_url; ?>" />
<?php } } ?>

Hello friends, my name is Hitendra Pushkar. I am also a software engineer like you all. has been designed by keeping in mind the needs of software engineers. The platform is for all software engineers.

We have to see a new technology and functionality in every new project. And there is a pressure on us all to submit these projects on stipulated time and deadline. We all do R & D so as to complete all these projects on the given deadline.

At the time of R & D we do something new! Learn! and see! But when we get a new project we forget the R & D efforts we put in the past. Hence we all save our R & D (hardwork) efforts in our email or system. For a while, we remember them. But after some time we forget those efforts too. And to complete the same work again, we have to carry out R & D again wherein we have to waste some time.

Just to preserve those R & D efforts, which we all have learned and seen, has been developed for. You can save all your R & D efforts in your account. And whenever you need to see those R & D efforts, you can view in your account and anytime you can use in your projects.

At you can easily find the solution of any problem. Your R & D efforts can help all the software engineers. Because all the R & D efforts will be posted in form of a blog, visible to all other users, and ultimately will help all engineers. I just want from all of you to help one another out and move forward!