美文网首页
Apache 配置301跳转

Apache 配置301跳转

作者: zlchen | 来源:发表于2021-02-22 15:59 被阅读0次
    <IfModule mod_rewrite.c>
        Options +FollowSymlinks -Multiviews
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
        RewriteCond % !^$
        RewriteRule ^/?(.*)/.*\.sql - [F]
    
        RewriteCond %{HTTP_HOST} ^test.cn [NC]
        RewriteRule ^(.*)$ http://www.test.cn/$1 [L,R=301]
    </IfModule>
    

    相关文章

      网友评论

          本文标题:Apache 配置301跳转

          本文链接:https://www.haomeiwen.com/subject/cehkfltx.html