Ensure that mod_rewrite is enabled.
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} 80 [NC,OR]
RewriteCond %{SERVER_PORT} 443 [NC]
RewriteRule ^(.*)$ http://sub.example.com:8069/web/login [R=301]
It will redirect everything from sub.domain.com on :80 and :443 to :8069 and /web/login
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…