htaccess的URL重定向 [英] .htaccess URL redirect

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

问题描述

如何可以重定向 http://domain.com/blog/index .PHP /博客/ rss_2.0 / http://www.domain.com/feed/用的.htaccess 的?

How can I redirect http://domain.com/blog/index.php/weblog/rss_2.0/ to http://www.domain.com/feed/ with .htaccess?

该网站有3个域名指向它,所有使用相同htaccess的。

The website has 3 domains pointing to it and all is using the same htaccess.

谢谢!

推荐答案

您可以使用mod_rewrite的。

You could utilise mod_rewrite.

RewriteEngine On
RewriteRule ^blog/index\.php/weblog/rss_2\.0/$ /feed/ [R=302]

这是应该的URL转发到/进料/在同一个域中的要求进来的。一旦你很高兴它的工作,你可以改变302到301。

That should forward the URL to /feed/ on the same domain as the request came in on. Once you're happy it's working you can change the 302 to 301.

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

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