简单(?)重定向使用的.htaccess [英] Simple (?) redirect using .htaccess

查看:100
本文介绍了简单(?)重定向使用的.htaccess的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是简单的,但我不知道该怎么做。

我希望这种形式的所有链接: http://www.fractalbit.gr/archives/xxx 重定向到这一点: http://www.fractalbit.gr/?p=xxx

解决方案

  RedirectMatch。* \ /档案\ /(+)http://www.fractalbit.gr/?p = $ 1
 

RedirectMatch在Apache的文档

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

解决方案

RedirectMatch .*\/archives\/(.+) http://www.fractalbit.gr/?p=$1

RedirectMatch in Apache docs

这篇关于简单(?)重定向使用的.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆