之前SEO也给大家分享过什么是301重定向,因为设置301重定向这对于搜索引擎来说是两个不同的站点,为了权重集中设置301重定向显得很重要,对搜索引擎很友好。
在Apache 中,有个很重要的文件.htaccess,通过对它的设置,可以实现很多强大的功能,301 重定向只是其中之一,今天就给大家讲讲wordpress程序与emlog程序如何设置301重定向?
wordpress设置301重定向:
# BEGIN WordPress
RewriteEngine On
RewriteCond %{http_host} ^yinese.com [NC]
RewriteRule ^(.*)$ http://www.yinese.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
emlog设置301重定向:
# BEGIN emlog
RewriteEngine on
RewriteCond %{http_host} ^yinese.com [NC]
RewriteRule ^(.*)$ http://www.yinese.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule . /index.php [L]
在Apache 中,有个很重要的文件.htaccess,通过对它的设置,可以实现很多强大的功能,301 重定向只是其中之一,今天就给大家讲讲wordpress程序与emlog程序如何设置301重定向?
wordpress设置301重定向:
# BEGIN WordPress
RewriteEngine On
RewriteCond %{http_host} ^yinese.com [NC]
RewriteRule ^(.*)$ http://www.yinese.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
emlog设置301重定向:
# BEGIN emlog
RewriteEngine on
RewriteCond %{http_host} ^yinese.com [NC]
RewriteRule ^(.*)$ http://www.yinese.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule . /index.php [L]