Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Remove shopware.php from canonical tag

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
jochen42
Smarty n00b


Joined: 19 Aug 2013
Posts: 2

PostPosted: Mon Aug 19, 2013 3:24 pm    Post subject: Remove shopware.php from canonical tag Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Mon Aug 19, 2013 4:25 pm    Post subject: Re: Remove shopware.php from canonical tag Reply with quote

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
View user's profile Send private message
jochen42
Smarty n00b


Joined: 19 Aug 2013
Posts: 2

PostPosted: Fri Aug 23, 2013 8:16 am    Post subject: Re: Remove shopware.php from canonical tag Reply with quote

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
View user's profile Send private message
douglassdavis
Smarty Junkie


Joined: 21 Jan 2008
Posts: 541

PostPosted: Fri Aug 23, 2013 11:42 am    Post subject: Re: Remove shopware.php from canonical tag Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP