thelia / thelia-redirect-url-module
0.3.1
2016-08-16 14:26 UTC
Requires
- thelia/installer: ~1.1
This package is auto-updated.
Last update: 2024-09-14 22:05:50 UTC
README
本模块的目的是使用302或301重定向(临时或永久)重定向404 URL。
安装
手动安装
- 将模块复制到
<thelia_root>/local/modules/
目录,并确保模块名称为 TheliaRedirectUrl。 - 在thelia管理面板中激活它
Composer
将其添加到主thelia composer.json文件中
composer require thelia/thelia-redirect-url-module:~0.3.0
用法
配置非常简单
- 您可以在模块配置中逐个添加重定向
- 您可以在工具中导入所有重定向,方法是在“导入”下的“重定向URL”。
其他
请确保您使用以下格式进行URL:“路径”+“参数”
例如
- '/'
- '/contact.html'
- '/contact.html?user_id=12&message=hello'
该模块将捕获Thelia的404响应并检查请求URI是否在redirect_url表中具有匹配的URL。如果没有,它将检查pathInfo。如果找到匹配项,则将其重定向到提供的临时重定向,否则将重定向到必填的重定向列。