# 船宝平台 · Apache 全站加密登录配置
# 用法：上传到网站根目录，并把 AuthUserFile 改成服务器上 htpasswd 文件的真实绝对路径
# （htpasswd 文件务必放在网站目录外，例如 /home/htpasswd/shipstrade）

AuthType Basic
AuthName "ShipGod Protected - 请输入账号密码"
AuthUserFile /home/htpasswd/shipstrade
Require valid-user

# 只锁网页与静态资源，PHP 接口（登录/订单/支付回调）不锁
<FilesMatch "\.(html|htm|js|css|svg|png|jpe?g|gif|ico|json|webmanifest|woff2?|ttf)$">
    AuthType Basic
    AuthName "ShipGod Protected - 请输入账号密码"
    AuthUserFile /home/htpasswd/shipstrade
    Require valid-user
</FilesMatch>

# ==== AI 双通道路由（2026-09-16 添加）====
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^coze-api/v1/chat/completion$ /coze-proxy.php [L]
</IfModule>
