分类目录归档:互联网上

pligg SEO 关键词设定 URL优化

pligg版本:Pligg_Beta_9.8.2

1、meta keywords和descriptions的配置

Pligg缺省情况下以提交digg内容时候定义的keywords和summary作为页面的keywords和description内容。对于一些站点缺省的keyword或description的维护,可以直接修改tempaltes/meta.tpl,但这样很麻烦,可以通过“后台管理”提供的对lang.conf维护工具来实现keyworkds和descriptions缺省值进行动态维护和修改。

方法如下:

  • 在libs/lang.conf中增加如下内容:

//<SECTION>MISC</SECTION><ADDED>0.5</ADDED>
PLIGG_Meta_Description = “ENTER YOUR DESCRIPTION HERE”
//<SECTION>MISC</SECTION><ADDED>0.5</ADDED>
PLIGG_Meta_Keywords = “ENTER YOUR KEYWORD HERE”

  • 在templates/meta.tpl增加PLIGG_Meta_Description和PLIGG_Meta_Keywords
{* define your meta data here *}  {if $meta_description neq ""}         <meta name=”description” content=”{$meta_description},{#PLIGG_Meta_Description#}” /> {else}         <meta name=”description” content=”Yeeach.com” /> {/if}  {if $meta_keywords neq “”}         <meta name=”keywords” content=”{$meta_keywords},{#PLIGG_Meta_Keywords#}” /> {else}         <meta name=”keywords” content=”Yeeach.com” /> {/if}         <meta name=”Language” content=”{#PLIGG_Visual_Meta_Language#}” />         <meta name=”Robots” content=”All” />  {* the extra tabs are to make it lineup when viewing the source *}
 
  • 从“后台管理”->“设定配置”->“Modify Language”修改keyworkds和descriptions

2、URL搜索引擎友好

  • 从“后台管理”->“设定配置”->“Outgoing”将Outgoing links的值设定为id
  • 从“后台管理”->“设定配置”->“UrlMethod”将URL method将值设定为2
  • 从“后台管理”->“设定配置”->“FriendlyURLs”将Friendly URL’s for stories和Friendly URL’s for categories的值设定为false
  • cp htaccess.default .htaccess
  • 登录“后台管理”->“类别管理”,得到最下方自动生成的RewriteRule,拷贝到.htaccess,替代如下内容后面的内容##### You can find the below lines pre-made for you in the category management section of the admin panel
  • 如果新增了类别,需要重新到“后台管理”->“类别管理”得到新的RewriteRule,然后拷贝到.htaccess中。
  • 之所以将Friendly URL’s for stories和Friendly URL’s for categories的值设定为false,就是为了采用id号方式,避免中文编码urlencode后,mod_rewrite处理的问题。

http://forums.pligg.com/wiki-articles/8594-url-method.html

原文

Dynamic vs Static urls

Dynamic urls contain variables and are typically seen on database driven sites like blogs and forums. A static url does not contain any variables and does not change. Static urls are easier for your users to read. They are also sometimes ranked higher by search engines.
Examples
Dynamic url: yoursite.com/pligg/story.php?title=storytitle
Static url: yoursite.com/pligg/news/yourstorytitle

Url Method options

There are three options on the Url Method page in the admin panel. Choose Url Method 2 to enable static urls.

  • Method 1 = dynamic urls (default)
  • Method 2 = static urls

.htaccess

If you enable Url Method 2 in the admin panel you should see static urls on your site but when you click on an internal link you’ll probably get a 404 this page can not be found error. In order to work properly Url Method 2 requires modifications to your .htaccess file so that so that the new friendly urls are properly mapped to the actual files they refer to.
There is a default .htaccess file included in your Pligg installation called htaccess.default that contains a long list of rewrite commands that are meant to get you started. But you will probably need to modify this file in order to get static urls working properly on your site.

Step by Step Instructions
  1. Check with your host to see if mod rewrite is allowed. If not buy a DreamHost package to help pligg dev.
  2. Check with your host that Apache is configured to use .htaccess files (AllowOverride All)
  3. Get the latest htaccess.default from the SVN on sourceforge.
  4. Go to your admin panel/category management. At the bottom there is a rewrite rule for the categories. Copy this whole line and in htaccess.default paste over You need to copy the line for this whole thing to work right. Paste over the line: RewriteRule ^(all|pligg|category1|category2)/([a-zA-Z0-9-]+)/?$ story.php?title=$2 [L]
  5. Upload htaccess.default to your webserver in the root directory of your install. Overwrite the existing one.
  6. Rename “htaccess.default” to “.htaccess” (no quotes). Note the period in front. That period denotes a hidden file, and may cause it to disappear from some FTP clients. (You might need to enable showing of hidden files or call it by name when downloading).
  7. Turn on URL Method 2 in the admin panel.
  8. Enjoy friendly URL’s

If your Pligg is installed in a subfolder

If Pligg is installed in a subfolder: (ie : yourdomain.com/pligg/) then you will need to modify the RewriteBase in .htaccess:
Change RewriteBase / to RewriteBase /pligg/

Rewrite rule for categories

Every time you add a new category to your site you need to update the mod rewrite rules for the category urls. Simply go back to the admin panel / category management page copy the new rewrite rule and paste it on top of the old one in your .htaccess file.

It’s not working. How do i go back?

If this doesn’t work, mod_rewrite probably isn’t enabled on your webserver. You can go back to the admin panel and set Url Method to 1 again. No harm was done to any files during the instructions above and your site should operate fine without friendly urls.

电脑用手机GPRS无线上网,用手机蓝牙上网

       发现用手机的GPRS上网也是蛮舒服的,就是速度有点慢,大概也差不多只能忍受聊聊QQ,其他的就要看网页的大小了,如果人家网页做的小一点,就加载的块一点,如果是一个几百K的网页,访问速度真的是有点不能忍受,但是话说回来总还可以上上,有总比没有好嘛。
     需要怎么设置呢?首先需要的就是手机开通GPRS,手机支持蓝牙,不支持蓝牙,有数据线可以和电脑连的也可以。这里就介绍下蓝牙的。
如果你自己笔记本上有蓝牙适配器的话就最好了,直接可以和手机无线连接了,如果是其他笔记本或者是普通PC,那也只要去买个蓝牙适配器就可以了,价格2、30左右。买过来了,最简单的方法就是把蓝牙适配器的管理软件装上,其他就OK了。先是和手机建立蓝牙链接,之后就用那个蓝牙拨号服务拨号播上去就可以了。

open_img('attachments/200806/5988957251.jpg')

帐户密码不用填,直接拨号就行,等拨上去之后就可以上网了。流量记手机的GPRS流量,如果你没有包月的话,那是承受不起的,太贵了,如果是包月的可以给他用用完,不能便宜了移动哦。哈哈。

用了多少字节可以看那个拨号的,他有显示发送和接受的,显示的是字节,除以1000 就是 K,再处以 1000就是 M,字节计算吧

mysql查询语句优化

多多利用 "explain" 查询索引使用情况, 以便找出最佳的查询语句写法和索引设置方案
慎用 "select *", 查询时只选出必须字段
查询使用索引时, 所遍历的索引条数越少, 索引字段长度越小, 查询效率越高 (可使用 "explain" 查询索引使用情况)
避免使用 函数对查询结果进行处理, 将这些处理交给客户端程序负责
使用 "limit" 时候, 尽量使 "limit" 出的部分位于整个结果集的前部, 这样的查询速度更快, 系统资源开销更低
在 "where" 子句中使用多个字段的 "and" 条件时, 各个字段出现的先后顺序要与多字段索引中的顺序相符
在 "where" 子句 中使用 "like" 时, 只有当通配符不出现在条件的最左端时才会使用索引
在 mysql 4.1 以上版本中, 避免使用子查询, 尽量使用 "内/外连接" 实现此功能
减少函数的使用, 如果可能的话, 尽量用单纯的表达式来代替
避免在 "where" 子句中, 对不同字段进行 "or" 条件查询, 将其拆分成多个单一字段的查询语句效率更高

从数据库结构做起
字段类型的定义时遵循以下规则:
选用字段长度最小
优先使用定长型
尽可能的定义 "NOT NULL"
数值型字段中避免使用 "ZEROFILL"
如果要储存的数据为字符串, 且可能值已知且有限, 优先使用 enum 或 set
索引的优化至关重要(以下如果没有特殊说明, 均指查询密集的情况)
被索引的字段的长度越小, 该索引的效率越高
被索引的字段中, 值的重复越少, 该索引的效率越高
查询语句中, 如果使用了 "group" 子句, 根据其中字段出现的先后顺序建立多字段索引
查询语句中, 如果使用了 "distinct", 根据其中字段出现的先后顺序建立多字段索引
"where" 子句中, 出现对同一表中多个不同字段的 "and" 条件时, 按照字段出现的先后顺序建立多字段索引
"where" 子句中, 出现对同一表中多个不同字段的 "or" 条件时, 对重复值最少的字段建立单字段索引
进行 "内/外连接" 查询时, 对 "连接字段" 建立索引
对 "主键" 的 "unique" 索引 毫无意义, 不要使用
被索引字段尽可能的使用 "NOT NULL" 属性
对写入密集型表, 尽量减少索引, 尤其是 "多字段索引" 和 "unique" 索引

利用CPU漏洞进行攻击控制PC

据国外媒体报道,美国伊利诺斯州大学研究人员日前发明出一种新的计算机攻击方式,它可利用计算机处理器()漏洞来控制用户计算机。

多年以来,黑客一直是通过软件漏洞来发动攻击的。但本周二,伊利诺斯州大学研究人员却演示了一种新的攻击方式:通过更改计算机处理器来攻击计算机。

当然,现实中要发动这样的攻击可能要费些周折,但这种攻击方式极其隐蔽,几乎无法检测到。

要发动这样的攻击,研究人员使用了一种特定的可编程处理器,然后将恶意固件注入到处理器内存中。这样,黑客就可以伪装成合法用户进入计算机。

伊利诺斯州大学计算机系助理教授Samuel King称,要对处理器进行编程,只需更改一小部分处理器电路即可。King说:“这就好比是‘终极后门’,根本无需软件漏洞。”

目前,伊利诺斯州大学正在研发一种工具,可以检测到可被攻击的处理器。

现在的攻击方式真的是太强大了,一系列的免杀马都没法弄掉,谁知道自己电脑要有多少木马留着,当你知道了肯定恐怖的不行。。。。现在有通过硬件攻击,强大。

08年国内搜索引擎市场比例占用情况

于市场调研公司Analysys International的调查结果,2008年第一季度国内搜索引擎市场收入调查目前已经出炉,国内搜索引擎市场第一季度收入约为9.23亿人民币,其中百度为国内最大的搜索引擎,占有60.7%的份额。
  基于市场调研公司的分析,相对上一季度,搜索引擎市场的总收入下跌了2.5%,但是相比去年,则增长了87.3%。其中,百度占有最大的市场份额,60.7%,Google仅排名第二,占有26.8%的市场份额。
中国搜索引擎市场收入调查08第一季度

搜索引擎
市场份额

百度
60.7%


26.8%

雅虎中国
8.3%

中搜
1.1%

搜狗
1.1%

新浪
0.5%

网易
0.5%

mysql模糊查询sql语句

   $sql="select * from table_name where field_name like '%$var%'";

  ·希望通过“标题”对新闻库进行检索,关键字可能包含是中英文,如

  下 SQL 语句:

  select id,title,name from achech_com.news where title like '%a%'

  返回的结果,某些 title 字段确定带了“a”关键字,而有些则只有中文,

  但也随之返回在检索结果中。

  解决方法,使用 BINARY 属性(二进制进行检索,如:

  select id,title,name from achech_com.news where binary title like '%a%'

  返回的结果较之前正确,但英文字母区分大小写,故有时在检索如“Achech

  及“achech”的结果是不一样的。

  知道了使用 BINARY 属性可以解决前面这个问题,再看看 支持的

  UCASE 及 CONCAT 函数,其中 UCASE 是将英文全部转成大写,而 CONCAT 函

  数的作用是对字符进行连接,以下是我们完全解决后的 SQL 语句:

  select id,title,name from achech_com.news where binary ucase(title) like concat('%',ucase('a'),'%')

  检索的步骤是先将属性指定为 BINARY ,以精确检索结果,而被 like 的 title

  内容存在大小写字母的可能,故先使用 ucase 函数将字段内容全部转换成大

  写字母,然后再进行 like 操作,而 like 的操作使用模糊方法,使用 concat

  的好处是传进来的可以是直接的关键字,不需要带“%”万用符,将“'a'”直接

  换成你的变量,在任何语言下都万事无忧了。

  当然你也可以这么写:

  select id,title,name from achech_com.news where binary ucase(title) like ucase('%a%')

  检索的结果还算满意吧,不过速度可能会因此而慢N毫秒喔。

上面方法是网上找来的,可能以后要用到,这里做个记录。。。

各省(市)通信管理局网站备案工作联系电话

1  福建管局  0591-28355716

2  广东管局  020-87628386

3  北京管局  010-63310094

4  吉林管局  0431-88925397

5  海南管局  0898-66533682

6  广西管局  0771-2628411

        0771-2628420

7  浙江管局  0571-87078277

8  山东管局  0531-82092828

9  宁夏管局  0951-6198579

10  黑龙江管局 0451-53005815

11  云南管局  0871-3557966

12  山西管局  0351-8788032

13  湖北管局  027-87796899

14  陕西管局  029-88333377

15  甘肃管局  0931-4501253

      0931-4501254

16  重庆管局  023-68583779

   023-68000005

17  河北管局  0311-86699039

      0311-85363401

18  江苏管局  025-85039806

19  安徽管局  0551-5680622

20  四川管局  028-87013129

21  河南管局  0371-65795120

22  青海管局  0971-8206720

23  上海管局  021-63905006

24  **管局  0891-6336300

25  内蒙古管局  0471-6684145

  0471-6684149

26  江西管局  0791-6218176

27  新疆管局  0991-5858733

28  贵州管局  0851-8112300

29  辽宁管局  024-86581199

  024-86581199

30  湖南管局  0731-2338652

31  天津管局  022-60351158

         022-60351158

中国感人的一幕19日14点28分Google中国的搜索量为零

    那天正好是默哀三分钟,刚好那个时刻GOOGLE 的搜索数据为零 说明什么呢?国人都在为四川地震死去的同胞默哀,而是举国上下。

5月22日,Google中国表示,根据19日14点28分的搜索数据,Google中国的搜索量为零,这也从侧面表明,几乎所有的Google中国的用户当时都在进行哀悼。   据悉,这一现象是被Google中国内部一名工程师发现的。当时这名工程师正在总结前一天的搜索数据,却意外地发现在19日下午2点28分的时候,谷歌的搜索量为零。这位工程师感到非常感动,并写了一篇文章发表在Google中国官方博客上。
open_img('attachments/200805/6035464017.jpg')