php - 如何将 URL 后缀添加到自定义路由?
问题描述
我使用自定义路由创建了一个扩展:http ://example.com/myroute/ 。
我该怎么做:http://example.com/myroute .html?
如何在路线末尾添加“.html”?
解决方案
更简单的方法是创建自定义 URL 重写。
在 Magento BO 中,转到Marketing => SEO & Search => URL Rewrites => Add URL Rewrite。
- 请求路径:myroute.html
- 目标路径:myroute
- 重定向类型:否
推荐阅读
- flutter - Flutter Stepper - BoxConstraints 强制无限宽度
- excel - 如何在excel中将长字符串拆分为3个字母箱?
- powerbi - Power BI - 如何组合筛选器、行数和最早日期
- python - 使用多进程和 pandas 时使用 PyInstaller 创建 .exe 时出现 FileNotFoundError
- arduino - 项目“板上的球”(触摸屏连接)
- .net - 避免访问未经授权的数据 - 架构级别
- python - 如何将列表中的字符串转换为python中的切片?
- flutter - Jetifier flute_music_player-0.0.6 错误甚至无法解决androidx 问题:找不到符号导入android.support.v4.app.ActivityCompa
- html - Vuejs中显示错误消息时如何突出显示输入字段的边框颜色?
- python - 物体的不可见部分