jsp伪静态的一些想法,支持,上传源代码。

在上个星期我的小站 http://www.818mimi.com上线了,但是动态的,所以为了让搜索引擎更加喜欢我的小站,于是做了伪静态,但是很遗憾百度一直未收录都一周了,这些天一直在考虑为什么 百度 不收录网站。现在分析如下。 


•1.没有伪静态。 
•2.伪静态做的不完本,不是他所细化的类型 
•3.内容有重复,因为70%的数据来自互联网 


针对以上的缺点我做了一下改善。 
我伪静态的路径如下 
http://818mimi.com/article_2.html  ---->表示 该栏目第一页 
http://818mimi.com/article_view_55.html --->表示该栏目的第一页的某个文章。 
所以想改成以下 
article/1/1.html    --->栏目首页。 
article/1/1_1.html   --->这样以目录的方式存在搜索引擎或许更喜欢。 


关于伪静态使用的是urlwriten 。 
顶下,小弟会将配置文件发上来,并详细说明。谢谢 
过几天改进后会将配置问价写上来。 


不过现在可以看看伪静态效果,虽然有点广告嫌疑。


修改下,发XML文件
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.1//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.1.dtd">


<!--


    Configuration file for UrlRewriteFilter
    http://tuckey.org/urlrewrite/


-->
<urlrewrite>


	<rule>
	  <from>^/index.html$</from>
	  <to>/index.jsp</to>
	</rule>
	<rule>
	  <from>^/default.html$</from>
	  <to>/default.jsp</to>
	</rule>
	<rule>
	  <from>^/article_(.[0-9]*).html$</from>
	  <to>/FwArticleSvt?mid=$1</to>
	</rule>
	
	<rule>
		<from>^/article_view_(.[0-9]*).html$</from>
		<to>/FwArticleSvt?method=view&aid=$1</to>
	</rule>
	<!-- method=list&mid=3&pageIndex=2
	http://818mimi.com/FwArticleSvt?method=list&mid=2&pageIndex=2
	 -->
	 
	<rule>
		<from>^/article_list_(.[0-9]*)_(.[0-9]*).html$</from>
		<to>/FwArticleSvt?method=list&mid=$1&pageIndex=$2</to>
	</rule>
	
	<!-- 
	http://818mimi.com/FwProducSvt?pageIndex=2
	 -->
	<rule>
		<from>^/product_(.[0-9]*).html$</from>
		<to>/FwProducSvt?pageIndex=$1</to>
	</rule>
	
    <outbound-rule>
        <note>
            The outbound-rule specifies that when response.encodeURL is called (if you are using JSTL c:url)
            the url /rewrite-status will be rewritten to /test/status/.


            The above rule and this outbound-rule means that end users should never see the
            url /rewrite-status only /test/status/ both in thier location bar and in hyperlinks
            in your pages.
        </note>
        <from>/rewrite-status</from>
        <to>/test/status/</to>
    </outbound-rule>


</urlrewrite>


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值