Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑问] 关于supesite静态化 改变目录的疑问

[复制链接]
xujirun 发表于 2010-3-29 18:54:12 | 显示全部楼层 |阅读模式
本帖最后由 xujirun 于 2010-3-29 19:12 编辑

我是用supesite来建站的,原来的静态化文件都是生成在/html目录下,搜索引擎也收录不少了。现在我想按分来来放静态化的文件,如下
          原来的           http://www.embedstudy.com/html/00/3700.html
          现在变成了 http://www.embedstudy.com/topic/2010-3600.html  (topic是分类,可能是其他的值 如download等等)

          然后我用了笨吧的404.php做重定向,代码如下:
<?php
ob_start();
$url='http://www.embedstudy.com/';  //定义成你的网址就OK!
$a=$_SERVER['HTTP_X_REWRITE_URL'];
$b=array();
$b=explode('/',$a);
$a=$b[count($b)-1];

if(strstr($a,'.html')){
$a=str_replace('.html','',$a);
if(strstr($a,'category-catid-')){
  $a=(int)str_replace('category-catid-','',$a);
  //header("Location: "."$url"."?category-"."$a");
  header("Location:html/00/n-3700.html");
  exit;
}else{
  $a=strstr($a,'n-')?(int)str_replace('n-','',$a)int)str_replace('joke','',$a);
  //header("Location: "."$url"."?viewnews-"."$a");
header("Location:html/00/n-3800.html");  
  exit;
}
}else
{
//header("Location: "."$url");
header("Location:html/00/n-3900.html");
}
ob_end_flush();
?>


         我想请问这样根据规则做了404转向,会不会影响搜索引擎收录,如果会,该如何解决呢?



管理员、笨吧帮忙回答下啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-8-22 06:29 , Processed in 0.081481 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表