最近在做.Text Blog的Wap版,因为手机上输入比电脑上更难,所以,如果用户手动输入地址访问Blog的话,会对没有意义又繁长的URL非常反感,所以,花了点时间做了.Text对二级域名的支持并对其地址分析功能做了些优化,可是做好后发现,.Text的搜索引擎并不支持这种域名方式,没办法,只好对它的搜索引索又动了点小手术。(博客园现在有点慢啊)

1、对Web.config的修改:

让.Text的搜索引擎支持二级域名    <SearchConfiguration type="Dottext.Search.SearchConfiguration, Dottext.Search" urlFormat="http://{1}{0}/Blog/{2}/{3}.aspx"
让.Text的搜索引擎支持二级域名        virtualPath
="~/SearchIndex" physicalPath="D:\Code\MSS1\Blog\DotTextWeb\SearchIndex" domains=".tzl.com"
让.Text的搜索引擎支持二级域名        pageSize
="20" />

其中http://{1}{0}/Blog/{2}/{3}.aspx中的Blog是你的应用程序名,比如你的程序在www.blog.com/blog下,注意domains不要加上www之类的

2、将Dottext.Search.EntryData类的CreateDoc(IDataReader reader)方法改成这样

让.Text的搜索引擎支持二级域名        private Document CreateDoc(IDataReader reader)
        }

相关文章:

  • 2022-01-23
  • 2021-08-05
  • 2021-06-06
  • 2021-08-26
  • 2021-09-24
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2022-02-23
  • 2021-06-12
  • 2021-11-20
  • 2021-07-27
  • 2021-06-03
  • 2021-08-08
相关资源
相似解决方案