- 因为网站做了重定向,以前的文件如何跳转到新地址
- 首先 配置中需打开rewrite支持 然后在htaccess中 RewriteEngine On RewriteRule ^news.([\d]+).([\d]+).htm$ old.php?-$1-$2.htm old.php头部加这个判断 $str =" ".str_replace('-','.',$_SERVER['QUERY_STRING']); if (substr($_SERVER['REQUEST_URI'],0,5) !='/news') header($str); else echo 'this is the right url'; ?>