使用 .htaccess 进行简单(?)重定向
这可能很简单,但我不知道该怎么做。
我想要这种形式的所有链接: http://www.fractalbit.gr/archives/xxx 重定向到此: http://www.fractalbit.gr/?p=xxx
this is probably simple but i don't know how to do it.
I want all links of this form: http://www.fractalbit.gr/archives/xxx
to redirect to this: http://www.fractalbit.gr/?p=xxx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apache 文档中的 RedirectMatch
RedirectMatch in Apache docs
像这样的东西吗?
然而,一切都取决于您是否被允许以这种方式使用 .htaccess。网络主机并不总是允许这样的事情。
PS:这称为重写而不是重定向,但我认为这就是你的意思。
Something like this?
All depends however, a lot on whether you are allowed to use .htaccess in such a way. Stuff like this is not always permitted by webhosts.
PS: this is called rewriting as opposed to redirecting, but I think this is what you mean.