.htaccess URL 重定向

编程入门 行业动态 更新时间:2024-10-08 10:50:08
本文介绍了.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 重定向

本文发布于:2023-10-10 18:27:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479379.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   htaccess   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!