Php xampp未加载图像
未在xammp包中加载映像 我的apache虚拟主机配置:Php xampp未加载图像,php,image,xampp,serve,Php,Image,Xampp,Serve,未在xammp包中加载映像 我的apache虚拟主机配置: <VirtualHost *:80> DocumentRoot "C:\xampp\htdocs\shop.local" ServerName shop.local ErrorLog "logs/shop.local-error.log" CustomLog "logs/shop.local-access.log" common </VirtualHost> 根目录中的htacc
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\shop.local"
ServerName shop.local
ErrorLog "logs/shop.local-error.log"
CustomLog "logs/shop.local-access.log" common
</VirtualHost>
根目录中的htaccess:
AddDefaultCharset utf-8
RewriteEngine On
RewriteRule (.*) public/$1
公共目录中的htaccess:
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule (.*) index.php?$1 [L,QSA]
index.php文件:
<?php
require dirname(__DIR__) . '/public/errors/404.php';
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<div class="wrap">
<div class="logo">
<img src="/errors/images/404.png">
</div>
</div>
</body>
</html>
我只是在.htaccess中写入了错误的条件
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
适当地:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
您是否收到任何特定错误?路径是
/error/
而不是/errors/
。我希望这不是againPath is/errors/问题帖子中的错误。这是我写问题时的错误。我没有收到任何具体错误。我添加了apache日志。
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d