IT log

moral & concision is my dream.

apache rewrite redirect 301

在 motto 原有的 .htaccess 文件中新增了两行, 解决了把 http://zuolo.info/motto 目录地址 使用 301 跳转到子域名 motto.zuolo.info

.htaccess 修改后的内容如下:

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{HTTP_HOST} !^motto\.zuolo\.info$ [NC]
RewriteRule (.*) http://motto.zuolo.info/$1 [R=301,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?$0
</IfModule>

posted by Leon Tsang in Live - Work and Struggle and have No Comments

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment