删除URL的一部分 [英] Remove part of a URL
本文介绍了删除URL的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何删除http://domain/main/about
因此URL会像这样http://domain/about
谢谢
推荐答案
好吧,在没有更多详细信息的情况下,您可以尝试执行以下操作:
Well, in the absence of any further details, you could try something like this:
RewriteRule (.*)/main/(.*) $1/$2
但这是一个非常广泛的规则-您可能想要比这更紧密地调整它.尝试将RewriteLogLevel设置为9,并观察规则的处理过程,以便您更好地了解要匹配的内容.
But this is a VERY broad rule - you'd probably want to tune it more tightly than that. Try turning the RewriteLogLevel to 9 and watching the rules as they get processed so you can get a better idea of what is being matched.
这篇关于删除URL的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文