承接 advancedideasmechanics/mezzio-canonical-url 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

advancedideasmechanics/mezzio-canonical-url

Composer 安装命令:

composer require advancedideasmechanics/mezzio-canonical-url

包简介

Automated PSR-7 Canonical URL middleware for Mezzio applications using Laminas-View.

README 文档

README

PSR-7 Canonical URL middleware for Mezzio applications using Laminas-View.

Composer

composer install advancedideasmechanics/mezzio-canonical-url

Use

Update pipeline.php to use Middleware.

Recommend placing between $app->pipe(RouteMiddleware::class); and $app->pipe(ImplicitHeadMiddleware::class);

'$app->pipe(AdvancedIdeasMechanics\MezzioCanonicalUrl\Middleware\CanonicalUrlMiddleware::class);'

Set below in the templates\layout\default.phtml

'if (isset($this->canonicalUrl)) { $this->headLink(['rel' => 'canonical', 'href' => $this->canonicalUrl]); }'

If you want to override another page, example templates\app\about.phtml

'$this->canonicalUrl = 'https://example.com/about';'

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-15