欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

400 bad request 自己亲自做的 有大用 有大大用

手机上输入 www.shrszg.cn 


400 bad request 

Bad Request 


Your browser sent a request that this server could not understand. 

Request header field is missing ':' separator. 


经检查 原来  .htaccess 文件中 是 http 电脑站 直接 跳转到了 手机站 https 

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC]

RewriteCond %{HTTP_HOST} shrszg.cn$ [NC]

RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg)$ [NC] 

RewriteRule ^(.*)$ https://wap.shrszg.cn/ [NC,R=301]


我把 https 改成了 http    这样子的话 由电脑的 http 跳转到手机站的 http 


RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC]

RewriteCond %{HTTP_HOST} shrszg.cn$ [NC]

RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg)$ [NC] 

RewriteRule ^(.*)$ http://wap.shrszg.cn/ [NC,R=301]


然后在 手机站里面的 http 跳转到 手机站的  https 

手机里的 .htaccess 手机里的 .htaccess 跳转  (由http 跳转到 https ) 的代码如下 

RewriteCond %{SERVER_PORT} 80

RewriteCond %{HTTP_HOST} wap.shrszg.cn$ [NC]

RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]


普通分类: