斜杆下载多重安全检测下载网站、值得信赖的软件下载站!

emlog个人博客系统301重定向怎么做?

时间:2022-01-13 20:07:35

小编:斜杆下载

emlog个人博客系统301重定向怎么做?

Linux 主机 Apache服务器 Mod-Rewrite 模式:修改.htaccess文件









 

<IfModule mod_rewrite.c>
                       RewriteEngine on
                       RewriteCond %{HTTP_HOST} ^***.cn$ [NC]
                       RewriteRule ^(.*)$ http://www.***.cn/$1 [R=301]
                       RewriteCond %{REQUEST_FILENAME} !-f
                       RewriteCond %{REQUEST_FILENAME} !-d
                       RewriteBase /
                       RewriteRule . /index.php [L]
                    </IfModule>

Windows 主机 Apache服务器 Mod-Rewrite 模式:修改.htaccess文件

 

 

 

 

 

 

 

 

 

<IfModule mod_rewrite.c>

                       RewriteEngine on

                       RewriteCond %{HTTP_HOST} ^***.cn$ [NC]

                       RewriteRule ^(.*)$ http://www.***.cn/$1 [R=301]

                       RewriteCond %{REQUEST_FILENAME} !-f

                       RewriteCond %{REQUEST_FILENAME} !-d

                       RewriteBase /

                       RewriteRule ^(.*)$ /index.php/$1 [L]

                    </IfModule>


猜你喜欢

最新攻略

热门文章

更多