【发布时间】:2018-11-28 03:18:28
【问题描述】:
是的,我的第一个 Stackoverflow 问题!已经存在很多年了,但这个让我着迷。
我有一个网址: https://example.com/site.com/phpBB3/general-f1/things-are-getting-crazy-here-t948-60.html
(我需要先在本地进行测试,这就是我设置它的原因)
我想将 URL 更改为: https://example.com/site.com/phpBB3/viewtopic.php?f=1&t=948&start=60
我在 /example.com/.htaccess 中有我的 .htaccess 文件,内容是:
RewriteEngine On
RewriteRule ([a-z0-9_-]*-f)([0-9]+)\/([a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$2&t=$4&start=$6 [QSA,NE,L,NC]
我设置了 AllowOverRide 并且启用了重写模块。
这似乎适用于https://htaccess.madewithlove.be/ 但不是在实际站点。我要疯了。我怎么了?
【问题讨论】:
标签: .htaccess mod-rewrite