Post by Biitnik » Mon May 18, 2015 4:38 pm

How can i echo my opencart url in header template?

Today my url looks like
http://www.mysite.com/eng/index.php?rou ... ry&path=79

i would like to echo only the part that is after language folder/ or after index.php?

i need this to create hreflang links in page header for google to understand that the same product or category page is also available in other languages.

Newbie

Posts

Joined
Thu Nov 27, 2014 4:17 pm

Post by Biitnik » Mon May 18, 2015 7:18 pm

Problem solved

Code: Select all

<link rel="alternate" hreflang="ru" href="http://www.mywebsite/ru/index.php?<?php echo $_SERVER['QUERY_STRING']; ?>" />

Newbie

Posts

Joined
Thu Nov 27, 2014 4:17 pm
Who is online

Users browsing this forum: No registered users and 7 guests