栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

404 Not Found 在此服务器上找不到请求的URL

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

404 Not Found 在此服务器上找不到请求的URL

处理完403问题后,又出现了404错误。检查了一下,应该是.htaccess文件配置的问题。由于是从chemicloud服务器直接打包文件上传到新的Bluehost服务器,两个服务器对Apache的配置有所区别。

个人还是更喜欢用chemicloud,后台界面对新用户更友好,没有Bluehost设置这么麻烦,售后技术反馈也比较及时,还可以让技术协助免费帮忙迁移站点。

这次之所以换服务器,第一,博客之前用的公司的chemicloud,准备独立做项目,所以要分开管理。第二,Bluehost活动力度太大了,CHOICE PLUS版本原价$18.99/月,活动竟然只要$5.45/月,不过只能买一年,超过一年就贵了。明年根据发展,再看要不要换回chemicloud。

问题提示:

Not Found
The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

解决办法:在.htaccess文件最前面增加强制重定向。

# BEGIN HTTPS Forced Redirect
# The directives (lines) between "BEGIN HTTPS Forced Redirect" and 
# "END HTTPS Forced Redirect" are dynamically generated, and should 
# only be modified via the filters. Any changes to the directives between 
# these markers will be overwritten.


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


# END HTTPS Forced Redirect

基本上加上这段就可以解决访问问题。

下面这一段一般是系统自动生成的,如果没有也需要加上。

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.

  AddHandler application/x-httpd-ea-php74___lsphp .php .php7 .phtml

# php -- END cPanel-generated handler, do not edit

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/974524.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号