处理完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



