Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
hanchengluo
V2EX  ›  Linux

.htaccess 转向

  •  
  •   hanchengluo · Dec 30, 2014 · 4010 views
    This topic created in 4345 days ago, the information mentioned may be changed or developed.

    域名domian.com,要将m.domain.com转到www.domain.com/mobile,.htaccess怎写?

    abelyao
    abelyao
    Dec 30, 2014❤️2
    1
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^m.domain.com [NC]
    RewriteRule ^(.*)$ http://www.domain.com/mobile/$1 [L,R=301]
    haozimiing
    haozimiing
    Dec 30, 2014
    3
    正确。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1907 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 11:41 · PVG 19:41 · LAX 03:41 · JFK 06:41
    ♥ Do have faith in what you're doing.