php - 使用友好 URL 时如何启用对指定 URL 的访问?
问题描述
我正在使用 Prestashop,但通过链接激活帐户时出现问题。我使用的是友好的 URL,点击激活链接后,会出现一个警告,提示该页面尚未找到。这是我.htaccess
在 prestashop 主目录中的文件
<FilesMatch "\.tpl$">
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
RewriteCond %{REQUEST_URI} !/module/activationbymail [NC]
RewriteRule ^(.*)/[0-9]+/?$ /$1/? [L,R=301]
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
RewriteCond %{REQUEST_URI} !/module/activationbymail [NC]
RewriteRule ^(.*)/[0-9]+/?$ /$1/? [L,R=301]
</IfModule>
</FilesMatch>
解决方案
推荐阅读
- algorithm - 将 2D 点聚类为边界框分解的算法
- sql-server - xp_cmdshell 查询输出上的文件类型
- c# - 如何使用 StreamWriter 将 DateTimeOffset 写入文件
- pandas - 在熊猫的每个组的开头插入多个日期
- html - 如何使引导文本框居中
- html - 如何在边距定位中使用百分比来创建 Bowser、设备和屏幕宽度兼容性?
- json - 如何在打字稿中进行json操作
- eclipse - Sprint Boot @ConfigurationProperties 是否与 Eclipse IDE 和 InteliJ IDEA 兼容?
- python - 使用 .format() 时 Python 错误地读取字典字符串
- sql - Teradata 中不再有用于查询的假脱机空间