...
|
...
|
@@ -69,7 +69,30 @@ public function createBtSite($domain, $ssl_open, $ssl_auto, $ssl_auto_day, $ssl_ |
|
|
if (empty($result) || empty($result['siteId']))
|
|
|
return false;
|
|
|
// 伪静态设置
|
|
|
// $bt->SaveFileBody($host, '');
|
|
|
$htaccess = '# SEO URL Settings
|
|
|
# Nginx configuration of OC htaccess
|
|
|
location = /sitemap.xml {
|
|
|
rewrite ^(.*)$ /index.php?route=feed/google_sitemap break;
|
|
|
}
|
|
|
|
|
|
location = /googlebase.xml {
|
|
|
rewrite ^(.*)$ /index.php?route=feed/google_base break;
|
|
|
}
|
|
|
|
|
|
location / {
|
|
|
# This try_files directive is used to enable SEO-friendly URLs for OpenCart
|
|
|
try_files $uri $uri/ @opencart;
|
|
|
# 隐藏index.php
|
|
|
if (!-e $request_filename) {
|
|
|
rewrite ^/(.*)$ /index.php?$1 last;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
location @opencart {
|
|
|
rewrite ^/(.+)$ /index.php?_route_=$1 last;
|
|
|
}
|
|
|
# End SEO settings';
|
|
|
$bt->SaveFileBody($host, $htaccess);
|
|
|
|
|
|
$result = BtSites::createBtSite($host, $result['siteId'], $ssl_open, $ssl_status, $ssl_auto, $ssl_auto_day);
|
|
|
$site = $result->toArray();
|
...
|
...
|
|