本文介绍了.htaccess URL 重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何重定向domain/blog/index.php/weblog/rss_2.0/ 到 www.domain/feed/ 与 .htaccess?
How can I redirect domain/blog/index.php/weblog/rss_2.0/ to www.domain/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 转发到与请求相同的域上的/feed/.一旦您感到满意,您就可以将 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 重定向
发布评论