Mr. AnvH

1 Soure code chạy nhiều subdomain hoặc domain theo module và theme khác nhau

Thứ hai - 13/03/2023 02:12

Hướng dẫn 1 soure code có thể chạy nhiều subdomain hoặc domain chạy mặc định module và themes tuỳ ý mình bên trên fix sẵn như thế

1 Soure code chạy nhiều subdomain hoặc domain theo module và theme khác nhau
1 Soure code chạy nhiều subdomain hoặc domain theo module và theme khác nhau
1 Soure code chạy nhiều subdomain hoặc domain theo module và theme khác nhau
// Add + Domain
if( ! isset( $global_config['site_home_module'] ) or empty( $global_config['site_home_module'] ) ) $global_config['site_home_module'] = 'home';
if( NV_MY_DOMAIN == 'https://nukeviet.site' ) $global_config['site_home_module'] = 'shops';
if( NV_MY_DOMAIN == 'https://site1.nukeviet.site' ) $global_config['site_home_module'] = 'page';
if( NV_MY_DOMAIN == 'https://nukeviet.shop' ) $global_config['site_home_module'] = 'news';

và 1 đoạn này nữa

// Add + Theme
if(NV_SERVER_NAME == 'nukeviet.site')
{$global_config['site_theme'] = 'themenuke';
}
elseif(NV_SERVER_NAME == 'site1.nukeviet.site')
{$global_config['site_theme'] = 'themesite';
}
elseif(NV_SERVER_NAME == 'nukeviet.shop')
{$global_config['site_theme'] = 'nukeshop';
}

Sửa trong public_html / file index.php

Tác giả: anvh.ceo

Tổng số điểm của bài viết là: 4 trong 1 đánh giá

Xếp hạng: 4 - 1 phiếu bầu
Click để đánh giá bài viết

  Ý kiến bạn đọc

Bạn đã không sử dụng Site, Bấm vào đây để duy trì trạng thái đăng nhập. Thời gian chờ: 60 giây