Apache 配置301跳转

2021-02-22  本文已影响0人  zlchen
<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>
上一篇下一篇

猜你喜欢

热点阅读