Home >Backend Development >PHP Tutorial >apache .htaccess内301跳转 兑现无www域名跳转到有www的域名

apache .htaccess内301跳转 兑现无www域名跳转到有www的域名

WBOY
WBOYOriginal
2016-06-13 10:46:531032browse

apache .htaccess内301跳转 实现无www域名跳转到有www的域名
网上搜集的方法:

根目录下建文件redirect.htaccess,内容为

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bysui.com [NC]
RewriteRule ^(.*)$ http://www.bysui.com/$1 [L,R=301]



为什么并没有实现跳转?


谢谢

------解决方案--------------------
是本地还是服务器的
服务器改过后不行就重启一下
http://topic.csdn.net/u/20120831/11/0e57d7df-8d90-4f23-92a9-61fd1d2b2546.html
------解决方案--------------------
apache支持重定向了没 看着没有错
------解决方案--------------------
注意你用了NC, 就是把bysui.com传到了RewriteRule了,搞清楚这个。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn