MENU

Typecho伪静态配置

December 2, 2017 • Read: 3068 • Linux阅读设置

适用Apache环境,创建.htaccess文件,添加以下内容

Typecho伪静态

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>

所有80端口流量重定向

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://ccav.me/$1 [R=301,L]
</IfModule>

所有流量重定向

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^ccav.me$ [NC]
    RewriteRule ^(.*)$ https://ccav.me/$1 [L,R=301]
</IfModule>

已在DirectAdmin下测试通过

Archives QR Code
QR Code for this page
Tipping QR Code
Leave a Comment

已有 1 条评论
  1. 飞翔的企鹅 飞翔的企鹅

    失踪人口回归