Destoon 預設企業商鋪偽靜態 URL 格式為 /com/用戶名/,為品牌化或 SEO 需求,常需修改為自定義目錄(如 /company/、/shop/、/supplier/)。
include/global.func.php$URL = DT_PATH.'com/'.$username.'/';$URL = DT_PATH.'yourdir/'.$username.'/';(yourdir 為自定義目錄名).htaccessnginx.conf / rewrite.confweb.config / httpd.ini/com/ 替換為 /yourdir/# 修改前 RewriteRule ^com/([a-zA-Z0-9_]+)/$ index.php?moduleid=4&username=$1 # 修改後 RewriteRule ^company/([a-zA-Z0-9_]+)/$ index.php?moduleid=4&username=$1
# 修改前 rewrite ^/com/([a-zA-Z0-9_]+)/$ /index.php?moduleid=4&username=$1 last; # 修改後 rewrite ^/company/([a-zA-Z0-9_]+)/$ /index.php?moduleid=4&username=$1 last;
userurl()、comurl() 等生成的連結正確# 保留在新規則之前 rewrite ^/com/([a-zA-Z0-9_]+)/$ /company/$1/ permanent;
此修改屬於核心路由變更,建議在測試環境充分驗證後再部署上線。