php - 迁移和更改目录后缺少 PHP 脚本图像
问题描述
迁移到另一个域后,我已将我的 PHP 脚本安装在我的网站 psc.af/photo 的目录中,并在其主目录(cPanel 中的 public_html)中一切正常,但图像未显示。当我检查图像链接时,它显示 mynewdomain.com/photo/images 不是,它从我以前安装的子目录中获取了照片目录。所以我看不到图像。我试图更改我的应用程序 url 并且它很好,唯一的问题是缺少图像。
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:cDd2jFWmOeQajBVf+UbCcCW9v0OxeZC/w+mp8qwgw0g=
APP_DEBUG=true
APP_URL=http://psc.af/
这是我的 .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
Options -Indexes
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Files composer.json>
order allow,deny
deny from all
</Files>
<Files composer.lock>
order allow,deny
deny from all
</Files>
<Files .env>
order allow,deny
deny from all
</Files>
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Remove index.php
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
</IfModule>
解决方案
推荐阅读
- python - mypy 中的计算类型
- sql - SQL Server 根据最小日期和其他两列选择多行
- batch-file - ipconfig 的多个条件的批处理文件检查 | 查找 /i 语句
- css - mix-blend-mode:乘法渲染不正确?
- c# - .Net Core 2 WebApp 从包 (zip) 发布到 iis
- react-native - 如何使用 React Native SectionList 制作嵌套的粘性标题?
- r - strptime 在遍历循环时返回 NA 值
- php - 在 Woocommerce 存档页面中翻译产品图像上的标签文本
- shopware - 如何显示 Shopware 货币开关
- php - PHPExcel:如何以毫秒为单位读取时间单元格,就像它们在 excel 中显示一样