【发布时间】:2017-12-25 07:14:48
【问题描述】:
我在 .htaccess 的帮助下将我的新模板作为根目录
RewriteEngine on
RewriteCond %{REQUEST_URI} !new/
RewriteRule (.*) /new/$1 [L]
但我有一个问题,所有产品图片都在默认的 public_html 上。我如何访问它,如果我想上传产品图片,那么我会收到此错误
Not Found
The requested URL /new/pimgs/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
请帮助解决这个问题。
【问题讨论】:
-
所以您想将
/new设为除 pimgs 文件夹之外的根文件夹? -
是的,但是在新模板中,图像是从 pimgs 调用的,当新文件夹转换为根目录时,我的新模板无法访问图像。
标签: .htaccess url-rewriting root