htaccess的重定向一个特定的页面来根重定向、页面、htaccess

2023-09-02 00:58:49 作者:霸道小姐=

有对SO几个变种的问题上,但我没有找到一个回答我的特定问题。

我想补充重写规则,以我的htaccess的,将采取所有流量将

  http://example.com/blog/its-a-sunny-day
 

和重定向到

  http://example.com
 
PHP中的.htaccess伪静态文件

在理想情况下,这应该通过302来完成,因为这将在以后进行修改。

解决方案

 重定向/博客/其-A-阳光明媚的一天http://example.com
 

这似乎工作。

There are several variant questions on this on SO, but I did not find one that answers my specific problem.

I want to add a rewrite rule to my htaccess that will take all traffic going to

http://example.com/blog/its-a-sunny-day

and redirect to

http://example.com

Ideally this should be done via 302, as it will be changed later.

解决方案

Redirect /blog/its-a-sunny-day http://example.com

This seems to work.