Home > Backend Development > PHP Tutorial > 301重定去少了个正斜杠

301重定去少了个正斜杠

WBOY
Release: 2016-06-23 13:52:44
Original
850 people have browsed it


10086fj.net/xiaojian/xinwendongtai/zuixindongtai/20140726/14.html
输入这网址显示不正常,10086fj.net/会被替换成www.10086fj.net 导致网址错误显示不正常,请解决
规则是这样子的:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^10086fj.net [NC]
RewriteRule ^(.*)$ http://www.10086fj.net/$1 [L,R=301]

这是什么原因呢 以及如何修改


回复讨论(解决方案)

我觉得还不如在代码中实现跳转来得容易些。

就是用户访问带有  abc.net  直接跳转到 www.abc.net,你觉得如何?

网站是静态的。。

RewriteEngine OnRewriteCond %{HTTP_HOST} ^10086fj\.net$RewriteRule ^(.*)$ http://www.10086fj.net$1 [R=301,L]
Copy after login

先用一下看下,郁闷,破空间弄个301还 这么麻烦

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template