1 Soure code chạy nhiều subdomain hoặc domain theo module và theme khác nhau
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ế
// 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
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
Ý kiến bạn đọc
Bạn cần đăng nhập với tư cách là Thành viên chính thức để có thể bình luận
Những tin cũ hơn