承接 miranj/craft-redirector 相关项目开发

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

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

miranj/craft-redirector

Composer 安装命令:

composer require miranj/craft-redirector

包简介

A Craft CMS plugin for redirecting URLs to entries.

README 文档

README

A Craft CMS plugin for handling legacy paths and URLs by preventing 404s and redirecting to the new entry's URL.

Contents

Usage

In order to handle legacy paths and URLs, we need to create a field to capture them. We can make use of Craft's built-in URL field for this purpose.

  1. Create a new field of type URL. Set the Allowed URL Types to Web Page.

  2. Add this field to all sections where entries have URLs of their own.

  3. Create a config file for this plugin config/redirector.php and add the handle of the field created in the first step.

    <?php
    
    return [
      'redirectField' => 'legacyUrl',
    ];

Installation

You can install this plugin with Composer.

Open your terminal and run the following commands:

# go to the project directory
cd /path/to/project

# tell composer to use the plugin
composer require miranj/craft-redirector:dev-dev

# tell Craft to install the plugin
./craft plugin/install redirector

Requirements

This plugin requires Craft CMS 3, 4, or 5.

Brought to you by Miranj

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固