Posts Tagged copy

使用.htaccess将网站首页301重定向到子页面

因为有个网站的首页被Google K掉了,具体体现为site:yourdomain.com时,搜索结果底部有如下提示:

根据我们收到的依据 US Digital Millennium Copyright Act(美国数字千年版权法案)提出的投诉,我们已从此网页上删除了 1 个结果。如果需要,您可以在 ChillingEffects.org 上阅读导致删除搜索结果的 DMCA 投诉。

同事提议弄个子页面和首页类似,然后将首页重定向到这个子页面试试,我真不懂这样有什么好处

具体做法是,在.htaccess里添加这么条规则:

RewriteRule ^$ http://www.yourdomain.com/yourpage.html [L,R=301]

  • Share/Bookmark

Tags: , , , ,

copyright

In China, copyright means copy is right.

转自念念的博客

  • Share/Bookmark

Tags: , , ,

Meta标签说明

Meta标签是用来描述网页属性的一种语言,标准的Meta标签可以便于搜索引擎排序,提高搜索引擎网站权重排名。要想网站做的更符合搜索引擎标准就必须了解meta标签的,下面给大家讲讲meta标签含义与使用方法:

1、META标签的keywords
写法为:<meta name=”Keywords” content=”信息参数” />
meat标签的Keywords的的信息参数,代表说明网站的关键词是什么。

2、META标签的Description
<meta name=”Description” content=”信息参数” />
meat标签的Description的信息参数,代表说明网站的主要内容,概况是什么。

3、META标签的http-equiv=Content-Type content=”text/html
http-equiv=Content-Type代表的是HTTP的头部协议,提示浏览器网页的信息,
<meta http-equiv=”Content-Type” content=”text/html; charset=信息参数” />
meat标签的Description的信息参数如GB2312时,代表说明网站是采用的编码是简体中文;
meat标签的Description的信息参数如BIG5时,代表说明网站是采用的编码是繁体中文;
meat标签的Description的信息参数如iso-2022-jp时,代表说明网站是采用的编码是日文;
meat标签的Description的信息参数如ks_c_5601时,代表说明网站是采用的编码是韩文;
meat标签的Description的信息参数如ISO-8859-1时,代表说明网站是采用的编码是英文;
meat标签的Description的信息参数如UTF-8时,代表世界通用的语言编码;

4、META标签的generator
<meta name=”generator” content=”信息参数” />
meat标签的generator的信息参数,代表说明网站的采用的什么软件制作。

5、META标签的author
<meta name=”author” content=”信息参数”>
meat标签的author的信息参数,代表说明网页版权作者信息。

6、META标签的http-equiv=”Refresh”
<Meta http-equiv=”Refresh” Content=”时间; Url=网址参数”>
meat标签的Refresh代表多少时间网页自动刷新,加上Url中的网址参数就代表,多长时间自动链接其他网址。

7、META标签的HTTP-EQUIV=”Pragma” CONTENT=”no-cache”
<META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”>代表禁止浏览器从本地计算机的缓存中访问页面内容,这样设定,访

问者将无法脱机浏览。

8、META标签的COPYRIGHT
<META NAME=”COPYRIGHT” CONTENT=”信息参数”>
meat标签的COPYRIGHT的信息参数,代表说明网站版权信息。

9、META标签的http-equiv=”imagetoolbar”
<meta http-equiv=”imagetoolbar” content=”false” />
指定是否显示图片工具栏,当为false代表不显示,当为true代表显示。

10、META标签的Content-Script-Type
<Meta http-equiv=”Content-Script-Type” Content=”text/javascript”>
W3C网页规范,指明页面中脚本的类型。
11、META标签的revisit-after
<META name=”revisit-after” CONTENT=”7 days” >
revisit-after代表网站重访,7 days代表7天,依此类推。

12、META标签的Robots
<meta name=”Robots” contect=”信息参数”>
Robots代表告诉搜索引擎机器人抓取哪些页面
  其中的属性说明如下:

  信息参数为all:文件将被检索,且页面上的链接可以被查询;

  信息参数为none:文件将不被检索,且页面上的链接不可以被查询;

  信息参数为index:文件将被检索;

  信息参数为follow:页面上的链接可以被查询;

  信息参数为noindex:文件将不被检索,但页面上的链接可以被查询;

  信息参数为nofollow:文件将不被检索,页面上的链接可以被查询。

13、META标签的<meta http-equiv=”windows-Target” contect=”_top”>
代表页面在当前窗口中以独立页面显示,可以防止自己的网页被别人当作一个frame页调用,设置有:_blank、_top、_self、_parent。

14、META标签的set-cookie
<meta http-equiv=”set-cookie” contect=”Mon,12 May 2001 00:20:00 GMT”>
代表Cookie设定,如果网页过期,存盘的cookie将被删除,需要注意的也是必须使用GMT时间格式;

  • Share/Bookmark

Tags: , , , , , , , , , , , , , , ,

zen cart product is linked

之前一直不明白zen cart产品目录上那个status属性黄黄的那一块是什么意思,也不懂怎么去更改它,上网查了一下,以下是官方解解:

What is a “Linked Product”?
 
A linked product is a product that is set up to display in more than one category.

This means that you only have to edit that product in one place in order to have changes take effect everywhere it is displayed.  If you put it on special in one place, it will be on special in the other place/category as well.

Linking also means that you’ll not see the same product appear more than once in a given list of products.

If you make a “copy” of a product, instead of linking it, then you will have two distinct and separate products which would require separate editing if you were to make changes later. Specials would affect one and not the other, unless you applied the Special to both individually.  In the case of a copy, you might end up seeing both versions of the product appearing in various product lists. 

总算明白,如果产品是linked状态的话,表示这个产品在不同的目录也有出现,而对网站来说它还是一个产品,就像一个用户可以隶属于不同的用户组一样,它们在数据库中只有一条记录;而非linked状态的两个相同产品,在数据库中有两条记录,系统会认为它们是不同产品,虽然产品名称和型号等信息是一样的;这个link功能很好用,灵活

至于怎么设置两个相同产品为link状态,在产品的copy to动作时可以选择的,选择Linked,或Duplicate(复制品)

  • Share/Bookmark

Tags: , , ,

bluehost因网站影响服务器性能冻结

前天一朋友为放在我bluehost上的博客购买了付费流量,也就是按月付费,几十块钱,每天能给网站带来几千IP,并承诺一个月内Alexa排名进20万,这个承诺有点胡扯了,不说能不能进,就算进了,本身也是没什么意义的

不过话说回来,进的可能还是大的,因为Alexa排名主要根据网站的非重复IP访问量,Alexa应该有个插件来监测这些数据,不过我感觉好像没用过,估计在中国用的人也不多

对方实现的方式很简单,就是在一个流量较大的网站上挂马,或者是对方自己运营的网站,这类网站有的如小说网,中国喜欢看小说的人多,太费时间了,我是多来不看的

这件事造成了很大麻烦,我真想不到小说有这么多人爱看;首先是公司的bluehost主机被关了,第一反应是侵权,但这些天没排名没广告没出单,前些天的单也过去很久了,老外应该没这么迟钝吧;看了邮件,里面原文如下:

Your web hosting account for XXXXXX.com has been deactivated, as of 10/23/2009. (reason: site causing performance problems)

This deactivation was due to a Terms of Service violation associated with your account. At sign-up, all users state that they have read through, understand, and agree to our terms. These terms are legal and binding.

Although your web site has been suspended, your data may still be available for up to 15 days past the date of deactivation; however, after this time, your account and all of its files, databases, and emails will be deleted.
If you feel this deactivation was made in error, or in order to gain access to your account, please call our customer service line as soon as possible at (888) 401-4678.
Please read the following, derived from our Terms of Service agreement, for additional information regarding the matter.
Engaging in any activity that, in BlueHost.Com’s sole and absolute discretion, disrupts, interferes with, or is harmful to (or threatens to disrupt, interfere with, or be harmful to) BlueHost.Com’s services, BlueHost.Com’s business, operations, reputation, goodwill, subscribers and/or subscriber relations, or the ability of BlueHost.Com’s subscribers to effectively use BlueHost.Com’s services is prohibited.

Please review the current copy of our Terms of Service here:
http://www.bluehost.com/cgi/terms

Thank you,
BlueHost.Com Support
http://www.bluehost.com
For support go to http://helpdesk.bluehost.com/
Toll-Free: (888) 401-4678

原来是网站造成了服务器性能问题,我查了日志,那个博客在一分钟内的请求达到200多次,高并发,造成服务器cpu占用过高,马上被冻结了

第一时间和客服联系上,bluehost的客服响应速度不错,但他们弄错了东西,就是认定是产品站的问题,我可急了,据理力争,让他们查日志去,最后各让一步,我删了那个博客站,总算解冻

如果我没搞错的话,这中间还是有BUG的,不然bluehost也不会搞错网站;客服毕竟是客服,这个,和思力的支持组差不多,汗一个

就像上次IXwebhosting一样,我忘了点应用按钮,以为优惠码不能用了,也是和对方客服争了半天,客服说是优惠码过期,我没办法,后来再试了下,点了应用键,居然行了,看来是客服不太敬业

而有的机子上,就算点了,也是报失效,哈哈,我这电脑的物理地址估计被ixwebhosting加为会员了

  • Share/Bookmark

Tags: , , , , , , , , , , ,

让关键词明显改观的28大seo技巧(转自林君)

关键词位置、密度、处理

1、URL中出现关键词(英文)
2、网页标题中出现关键词(1-3个)
3、关键词标签中出现关键词(1-3个)
4、描述标签中出现关键词(主关键词重复2次)
5、内容中自然出现关键词
6、内容第一段和最后一段出现关键词
7、H1,H2标签中出现关键词
8、导出链接锚文本中包含关键词
9、图片的文件名包含关键词
10、ALT属性中出现关键词
11、关键词密度6-8%
12、对关键词加粗或斜体

内容质量、更新频率、相关性

1、原创的内容最佳,切忌被多次转载的内容
2、内容独立性,与其他页面至少30%互异
3、1000-2000字,合理分段
4、有规律更新,最好是每天
5、内容围绕页面关键词展开,与整站主题相关
6、具有评论功能,评论中出现关键词

导入链接和锚文本

1、高PR值站点的导入链接
2、内容相关页面的导入链接
3、导入链接锚文本中包含页面关键词
4、锚文本存在于网页内容中
5、锚文本周围出现相关关键词
6、导入链接存在3个月以上
7、导入链接所在页面的导出链接少于100个
8、导入链接来自不同IP地址
9、导入链接自然增加
10、锚文本多样化(如,SEO和莆田SEO)

掌握以上SEO技巧,可以让你的关键词排名有明显改善。

  • Share/Bookmark

Tags: , , , , , ,

bluehost的php.ini配置

原来bluehost是可以自定义php(php.ini)设置的

在php config页面,有如下功能

Install Default php.ini

This will copy the master php.ini to your public_html directory named “php.ini.default”. You can then edit the file with any custom directives your scripts require. You can also select to have the file include the settings for IonCube and/or SourceGuardian

会在主域名根目录下生成php.ini.default文件,即默认的php.ini配置

我们可以更改这个文件,并把它重命名为php.ini,放在我们的任意网站根目录下,即可被reload,很灵活,可以对不同的域进行不同配置,强大!

  • Share/Bookmark

Tags: , , , , , ,

HTML特殊符号对照表

HTML特殊符号对照表:

特殊符号 命名实体 十进制编码 特殊符号 命名实体 十进制编码
Α &Alpha; &#913; Β &Beta; &#914;
Γ &Gamma; &#915; Δ &Delta; &#916;
Ε &Epsilon; &#917; Ζ &Zeta; &#918;
Η &Eta; &#919; Θ &Theta; &#920;
Ι &Iota; &#921; Κ &Kappa; &#922;
Λ &Lambda; &#923; Μ &Mu; &#924;
Ν &Nu; &#925; Ξ &Xi; &#926;
Ο &Omicron; &#927; Π &Pi; &#928;
Ρ &Rho; &#929; Σ &Sigma; &#931;
Τ &Tau; &#932; Υ &Upsilon; &#933;
Φ &Phi; &#934; Χ &Chi; &#935;
Ψ &Psi; &#936; Ω &Omega; &#937;
α &alpha; &#945; β &beta; &#946;
γ &gamma; &#947; δ &delta; &#948;
ε &epsilon; &#949; ζ &zeta; &#950;
η &eta; &#951; θ &theta; &#952;
ι &iota; &#953; κ &kappa; &#954;
λ &lambda; &#955; μ &mu; &#956;
ν &nu; &#957; ξ &xi; &#958;
ο &omicron; &#959; π &pi; &#960;
ρ &rho; &#961; ς &sigmaf; &#962;
σ &sigma; &#963; τ &tau; &#964;
υ &upsilon; &#965; φ &phi; &#966;
χ &chi; &#967; ψ &psi; &#968;
ω &omega; &#969; ϑ &thetasym; &#977;
ϒ &upsih; &#978; ϖ &piv; &#982;
&bull; &#8226; &hellip; &#8230;
&prime; &#8242; &Prime; &#8243;
&oline; &#8254; &frasl; &#8260;
&weierp; &#8472; &image; &#8465;
&real; &#8476; &trade; &#8482;
&alefsym; &#8501; &larr; &#8592;
&uarr; &#8593; &rarr; &#8594;
&darr; &#8595; &harr; &#8596;
&crarr; &#8629; &lArr; &#8656;
&uArr; &#8657; &rArr; &#8658;
&dArr; &#8659; &hArr; &#8660;
&forall; &#8704; &part; &#8706;
&exist; &#8707; &empty; &#8709;
&nabla; &#8711; &isin; &#8712;
&notin; &#8713; &ni; &#8715;
&prod; &#8719; &sum; &#8722;
&minus; &#8722; &lowast; &#8727;
&radic; &#8730; &prop; &#8733;
&infin; &#8734; &ang; &#8736;
&and; &#8869; &or; &#8870;
&cap; &#8745; &cup; &#8746;
&int; &#8747; &there4; &#8756;
&sim; &#8764; &cong; &#8773;
&asymp; &#8773; &ne; &#8800;
&equiv; &#8801; &le; &#8804;
&ge; &#8805; &sub; &#8834;
&sup; &#8835; &nsub; &#8836;
&sube; &#8838; &supe; &#8839;
&oplus; &#8853; &otimes; &#8855;
&perp; &#8869; &sdot; &#8901;
&lceil; &#8968; &rceil; &#8969;
&lfloor; &#8970; &rfloor; &#8971;
&loz; &#9674; &spades; &#9824;
&clubs; &#9827; &hearts; &#9829;
&diams; &#9830;   &nbsp; &#160;
¡ &iexcl; &#161; ¢ &cent; &#162;
£ &pound; &#163; ¤ &curren; &#164;
¥ &yen; &#165; ¦ &brvbar; &#166;
§ &sect; &#167; ¨ &uml; &#168;
© &copy; &#169; ª &ordf; &#170;
« &laquo; &#171; ¬ &not; &#172;
­ &shy; &#173; ® &reg; &#174;
¯ &macr; &#175; ° &deg; &#176;
± &plusmn; &#177; ² &sup2; &#178;
³ &sup3; &#179; ´ &acute; &#180;
µ &micro; &#181;
  • Share/Bookmark

Tags: , , , , , , , ,

PHP imagecopyresampled函数用法

imagecopyresampled
(PHP 4 >= 4.0.6)

imagecopyresampled — 重采样拷贝部分图像并调整大小
说明
int imagecopyresampled ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
imagecopyresampled() 将一幅图像中的一块正方形区域拷贝到另一个图像中,平滑地插入像素值,因此,尤其是,减小了图像的大小而仍然保持了极大的清晰度。dst_im 和 src_im 分别是目标图像和源图像的标识符。如果源和目标的宽度和高度不同,则会进行相应的图像收缩和拉伸。坐标指的是左上角。本函数可用来在同一幅图内部拷贝(如果 dst_im 和 src_im 相同的话)区域,但如果区域交迭的话则结果不可预知。

注: 因为调色板图像限制(255+1 种颜色)有个问题。重采样或过滤图像通常需要多于 255 种颜色,计算新的被重采样的像素及其颜色时采用了一种近似值。对调色板图像尝试分配一个新颜色时,如果失败我们选择了计算结果最接近(理论上)的颜色。这并不总是视觉上最接近的颜色。这可能会产生怪异的结果,例如空白(或者视觉上是空白)的图像。要跳过这个问题,请使用真彩色图像作为目标图像,例如用 imagecreatetruecolor() 创建的。

注: imagecopyresampled() 需要 GD 2.0.l 或更高版本。

zen cart  image handler里有用到这个函数

  • Share/Bookmark

Tags: ,

一款不错的网站压力测试工具webbench(转自张宴博客)

webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便。

  1、适用系统:Linux

  2、编译安装:

wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install

  3、使用:

webbench -c 500 -t 30 http://127.0.0.1/test.jpg  参数说明:-c表示并发数,-t表示时间(秒)

  4、测试结果示例:

Webbench – Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://127.0.0.1/test.jpg
500 clients, running 30 sec.

Speed=3230 pages/min, 11614212 bytes/sec.
Requests: 1615 susceed, 0 failed.

还可以用来攻击网站。。。哈哈,不过玩火很危险。。。

  • Share/Bookmark

Tags: , , , , , , , ,