Blogger Information
Blog 43
fans 0
comment 3
visits 26531
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
pbootcms二次开发:兼容模式301跳转伪静态模式
Time
Original
954 people have browsed it

地址:apps/common/HomeController.php

  1. class HomeController extends Controller
  2. {
  3. public function __construct()
  4. {
  5. //兼容模式301跳转伪静态模式
  6. if(strpos($_SERVER['REQUEST_URI'],"?")){
  7. $url_new = substr_replace($_SERVER['REQUEST_URI'],'',strpos($_SERVER['REQUEST_URI'],"?"),1);
  8. header("HTTP/1.1 301 Moved Permanently" );
  9. header("Location:{$url_new}");
  10. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!