|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jochen42 Smarty n00b
Joined: 19 Aug 2013 Posts: 2
|
Posted: Mon Aug 19, 2013 3:24 pm Post subject: Remove shopware.php from canonical tag |
|
|
Hello,
in filtered category pages of my shop the canonical tag is defined. The URL to the main category page is given. That's fine, but the URL is not completely correct, it has the "shopware.php" directory at the beginning. Example:
correct URL:
http://www.example.com/category1/
URL in the canonical tag:
http://www.example.com/shopware.php/category1/
Does anyone knows how to remove "shopware.php/"? |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Mon Aug 19, 2013 4:25 pm Post subject: Re: Remove shopware.php from canonical tag |
|
|
jochen42 wrote: | Hello,
in filtered category pages of my shop the canonical tag is defined. The URL to the main category page is given. That's fine, but the URL is not completely correct, it has the "shopware.php" directory at the beginning. Example:
correct URL:
http://www.example.com/category1/
URL in the canonical tag:
http://www.example.com/shopware.php/category1/
Does anyone knows how to remove "shopware.php/"? |
that looks like something that is done using apache rewrites. That is a complicated topic though. You can google "apache rewrite" |
|
Back to top |
|
jochen42 Smarty n00b
Joined: 19 Aug 2013 Posts: 2
|
Posted: Fri Aug 23, 2013 8:16 am Post subject: Re: Remove shopware.php from canonical tag |
|
|
douglassdavis wrote: |
that looks like something that is done using apache rewrites. That is a complicated topic though. You can google "apache rewrite" |
Thank you, douglassdavis.
I think that can't be a apache rewrite problem. mod_rewrite cannot insert code in the webpage. My problem is to remove "shopware.php/" from the canonical tag in the code of filtered category pages. |
|
Back to top |
|
douglassdavis Smarty Junkie
Joined: 21 Jan 2008 Posts: 541
|
Posted: Fri Aug 23, 2013 11:42 am Post subject: Re: Remove shopware.php from canonical tag |
|
|
jochen42 wrote: | douglassdavis wrote: |
that looks like something that is done using apache rewrites. That is a complicated topic though. You can google "apache rewrite" |
Thank you, douglassdavis.
I think that can't be a apache rewrite problem. mod_rewrite cannot insert code in the webpage. My problem is to remove "shopware.php/" from the canonical tag in the code of filtered category pages. |
My mistake. I was thinking the other way around. Usually people want to add shopware.php/ to the request at the server.
You could use the replace filter wherever the url is output. For example, if the url is in a variable $url.
<a href='{$url|replace:'example.com/shopware.php':'example.com'}'
Or you can do an output filter that replaces text on the entire page in the same way. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|