Download the PHP package wazum/seo-canonical-guard without Composer
On this page you can find all versions of the php package wazum/seo-canonical-guard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wazum/seo-canonical-guard
More information about wazum/seo-canonical-guard
Files in wazum/seo-canonical-guard
Package seo-canonical-guard
Short Description Prevent unwanted parameters in canonical URL
License GPL-3.0
Informations about the package seo-canonical-guard
SEO canonical guard
What does it do?
The TYPO3 core seo extension adds every given parameter from the request to the generated canonical URL.
This extension helps to prevent unwanted parameters in the canonical URL.
Extension plugin namespaces
By default parameters within the namespaces from active extensions (e.g. tx_news_pi1) using Extbase are allowed.
This still allows parameters not used by these extensions like tx_news_pi1[wtf]=seo.
If you need to include third-party parameters or parameters for extensions based on \TYPO3\CMS\Frontend\Plugin\AbstractPlugin (aka pi based) or need to be very strict, disable the setting and/or use the explicit whitelist.
Explicit whitelist
In addition to or as replacement for the allowed namespaces from active extension Extbase plugins (see above), you can set a whitelist if you need to allow additional parameters or want to specify exactly which parameters are allowed. Go to Admin Tools > Settings > Extension Configuration and select _seo_canonicalguard and set the allowed parameters or parameter namespaces as follows:
parameter1, parameter2, namespace_xy\[(.*?)\], namespace_yz\[(explicit1|explicit2)\]
You can add a list of single parameters or use regular expressions (you can omit the /…/ around, but you have to escape special characters).
Requirements
The extension depends on the TYPO3 core seo extension.
Installation
Require the latest package:
composer require wazum/seo-canonical-guard
Inspiration
The extension is inspired by https://github.com/sourcebroker/urlguard
which definitely should be installed too if you use the addQueryString when creating links with TypoScript!
Say thanks! and support me
You like this extension? Get something for me (surprise! surprise!) from my wishlist on Amazon or help me pay the next pizza or Pho soup (mjam). Thanks a lot!