Php 将silvertripe站点从一台服务器迁移到另一台服务器
我正在尝试将silverstripe站点从一个主机服务器移动到一个新的主机服务器。但是,我在网站上不断收到404错误,日志错误[Wed May 07 15:20:10 2014][error][client xxx.xx.xx.xxx]文件不存在:/home/examplesite/public\u html/sys\u cpanel,referer: 该站点使用silverstripe 2.4.5,在旧服务器上一切正常。新的托管公司正在使用一个编号的预览链接,例如,在你关闭实时网站之前,为你确保网站正常工作。有人能给我指一下正确的方向吗?谢谢 以下是我所做的: 1.已将所有ftp文件移动到新服务器 2.迁移数据库 3.通过mysite文件夹中的_config.php建立数据库连接 4.更改。htaccess 这是我在第一行注释掉的.htaccess文件,因为它指向实时站点,我还尝试将预览地址放入()中,但也没有成功Php 将silvertripe站点从一台服务器迁移到另一台服务器,php,.htaccess,hosting,cpanel,silverstripe,Php,.htaccess,Hosting,Cpanel,Silverstripe,我正在尝试将silverstripe站点从一个主机服务器移动到一个新的主机服务器。但是,我在网站上不断收到404错误,日志错误[Wed May 07 15:20:10 2014][error][client xxx.xx.xx.xxx]文件不存在:/home/examplesite/public\u html/sys\u cpanel,referer: 该站点使用silverstripe 2.4.5,在旧服务器上一切正常。新的托管公司正在使用一个编号的预览链接,例如,在你关闭实时网站之前,为你确
###RewriteRule mambo/ http://www.examplesite.com/ [R=301,L] ###
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} /assets/Uploads/members/ANZJAT [NC]
RewriteCond %{REQUEST_FILENAME} \.(pdf|zip|rar|7z|doc|docx|xls|xlsx|ppt|pptx)$ [NC]
RewriteRule .* filedownloadpermission?file=%{REQUEST_FILENAME}&%{QUERY_STRING} [L,NC]
</IfModule>
### SILVERSTRIPE END ###
<?php
global $project;
$project = 'mysite';
global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "servername",
"username" => "admin",
"password" => "xxxxxxx",
"database" => "examplesite_database",
);
MySQLDatabase::set_connection_charset('utf8');
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));
Director::set_environment_type("live");
SSViewer::set_theme('themename');
Email::setAdminEmail('info@examplesite.com');
Geoip::$default_country_code = "countryname";
DataObject::add_extension('Member', 'MemberExtension');
DataObject::add_extension('SiteConfig', 'CustomSiteConfig');
Security::set_default_login_dest('members');
SortableDataObject::add_sortable_class('EventSession');
SortableDataObject::add_sortable_class('ClientType');
define('NON_MEMBER_TYPE', 'non-member');
Director::AddRules(100, array('filedownloadpermission/$Action/$ID/$OtherID' => 'FileDownloadPermission_controller'));
?>
###重写规则mambo/http://www.examplesite.com/ [R=301,L]###
###银条起点###
命令拒绝,允许
全盘否定
允许从127.0.0.1开始
重新启动发动机
重写基/
重写cond%{REQUEST_URI}!(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond%{REQUEST_URI}^(.*$
重写cond%{REQUEST_FILENAME}-F
重写规则。*sapphire/main.php?url=%1&%{QUERY\u STRING}[L]
RewriteCond%{REQUEST_URI}/assets/Uploads/members/ANZJAT[NC]
重写COND%{REQUEST|u FILENAME}\(pdf | zip | rar | 7z | doc | docx | xls | xlsx | ppt | pptx)$[NC]
重写规则。*filedownloadpermission?文件=%%{REQUEST_FILENAME}&%%{QUERY_STRING}[L,NC]
###银条端###
这是mysite文件夹中的_config.php,我试图将其更改为dev而不是live,但也没有成功
###RewriteRule mambo/ http://www.examplesite.com/ [R=301,L] ###
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} /assets/Uploads/members/ANZJAT [NC]
RewriteCond %{REQUEST_FILENAME} \.(pdf|zip|rar|7z|doc|docx|xls|xlsx|ppt|pptx)$ [NC]
RewriteRule .* filedownloadpermission?file=%{REQUEST_FILENAME}&%{QUERY_STRING} [L,NC]
</IfModule>
### SILVERSTRIPE END ###
<?php
global $project;
$project = 'mysite';
global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "servername",
"username" => "admin",
"password" => "xxxxxxx",
"database" => "examplesite_database",
);
MySQLDatabase::set_connection_charset('utf8');
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));
Director::set_environment_type("live");
SSViewer::set_theme('themename');
Email::setAdminEmail('info@examplesite.com');
Geoip::$default_country_code = "countryname";
DataObject::add_extension('Member', 'MemberExtension');
DataObject::add_extension('SiteConfig', 'CustomSiteConfig');
Security::set_default_login_dest('members');
SortableDataObject::add_sortable_class('EventSession');
SortableDataObject::add_sortable_class('ClientType');
define('NON_MEMBER_TYPE', 'non-member');
Director::AddRules(100, array('filedownloadpermission/$Action/$ID/$OtherID' => 'FileDownloadPermission_controller'));
?>
感谢您的帮助。将RewriteBase/更改为RewriteBase/~examplesite。只需在网站上线后恢复此功能,因为这只是在您试图通过
谢谢。或者,最好将
RewriteBase/
更改为RewriteBase/~examplesite
。只需在网站上线后恢复此功能,因为这只是在您试图通过http://xx.xx.xx.xx/~examplesite/
。嗨,谢恩,很抱歉回复晚了,非常感谢你的提示,它解决了我的问题。非常感谢。你愿意在下面回答吗?这样我就可以选择你的答案了?如果不是的话,我会自己关上它。我感谢你的帮助。