【发布时间】:2019-02-07 12:31:07
【问题描述】:
我有一个 wordpress 博客,我已将“上传”文件夹更改为子域。
我以前的地址是这样的。
https://guilaneman.ir/wp-content/uploads /.../.../
我的新网址:
https://images.guilaneman.ir/1/
我使用了这段代码:但它不起作用:
重写引擎开启 RewriteBase / RewriteRule ^/uploads/(.*)$ https://images.guilaneman.ir/1/$1 [R=301,L]请注意,我在子文件夹中有另一个 wordpress 博客,我将此代码放在我想要重定向的 wp-content 文件夹中。
如何将 guilaneman.ir/wp-content/uploads/ 重定向到 images.guilaneman.ir/1/
【问题讨论】:
-
@RaviSachaniya 非常感谢。我读了这篇文章,但我的问题是使用 htaccess 重定向。
-
@RaviSachaniya 我成功更改了我的网址,但我想将以前的路径重定向到新的路径