bolt/redirector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bolt/redirector

最新稳定版本:2.0.0

Composer 安装命令:

composer require bolt/redirector

包简介

🔄 This Bolt extension adds redirects using YAML

README 文档

README

Author: Ivo Valchev

Bolt Redirector is a Bolt CMS extension that performs simple URL redirects defined in a clean YAML config file.

Features

  • Define redirects in YAML (fromto).
  • Match redirects by either absolute path (/old-page) or full URL (https://example.org/old-page).
  • Configurable HTTP status code (default 302 / “Found”).
  • Avoids redirecting Bolt backend and async/admin requests.

Installation:

composer require bolt/redirector

Configuration

After installation, configure the extension using its config file (typically located under your project’s Bolt extensions config directory, depending on how your Bolt project is set up).

The extension ships with a config.yaml template that documents these options.

Example config.yaml

# Redirector extension configuration file

# Optional: status code for redirects
# Common values:
#  - 301 (permanent)
#  - 302 (temporary, default)
status_code: 301

redirects:
  # You can use an absolute path:
  /page/about: /page/about-us

  # You can also match a full URI (quote it because of ":" in "https://"):
  "https://example.org/page/mission": "/page/our-mission"

  # Trailing slashes are normalized, so these are treated the same:
  /blog: /news
  /blog/: /news/

Running Rector, PHPStan and Easy Codings Standard

First, make sure dependencies are installed:

COMPOSER_MEMORY_LIMIT=-1 composer update

And then run code quality checks:

  • vendor/bin/rector process -n --no-progress-bar --ansi
  • vendor/bin/phpstan analyse --ansi
  • vendor/bin/ecs check src --ansi

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固