【发布时间】:2013-03-29 15:12:21
【问题描述】:
我想重定向这种形式的 URL:
/page.html?variable=value&othervar=true&thirdvar=100
对此:
/page/?variable=value&othervar=true&thirdvar=100
所以基本上我只想用forward slash替换URL中间的.html,但我需要保留它附带的get字符串。这是我尝试过的:
重写规则 ^page.html(.+)$ /page/$1 [L,R=301]
但这似乎对我不起作用。我最近做了类似的事情,但我不知道我在这里缺少什么。感谢您的任何意见。
【问题讨论】:
-
哎呀,我应该使用降价系统。我还是新手。谢谢你的帮助,维克多。
标签: regex apache .htaccess redirect mod-rewrite