0

我在服务器上有一个站点,可以访问 ftp 但没有 SSH。

由于必要的 DNS 更改,该站点的主页正在尝试从不存在的文件路径加载图像。

我可以使用 .htaccess 告诉页面文件所在的位置吗?

它要查找的所有文件都在一个文件夹中,但嵌套结构与 DNS 更改之前不同。

谢谢!

4

2 回答 2

2

试试Alias

Alias /the/url/path/that/no/longer/exists /physical/path/to/where/files/are
于 2012-08-04T23:41:35.473 回答
1

在 .htaccess 中:

RewriteEngine On
RewriteRule ^oldpage.html$ http://yoursite.com/newpage.html [R=301,L]
于 2012-08-04T23:42:45.347 回答