lighttpd环境下在kloxo中把网站301重定向到另外一个网站

Posted by yar999 in lighttpd on 2012/04/01 with 2 Comments

例如,需要把 yar999.org和www.yar999.org做301重定向到www.yar999.com 可以按照下面给 yar999.org这个网站配置下面的伪静态规则

$HTTP["host"] =~ "(www.yar999.org|yar999.org)" {
url.redirect = ( "^/(.*)" => "http://www.yar999.com/$1" )
}

 

具体操作如下图所示 配置好之后,需要重启lighttpd才生效~

kloxo下配置lighttpd下的zencart 1.3.9h基于ultimate seo urls插件的伪静态规则

Posted by yar999 in lighttpd on 2010/11/07 with No Comments

环境:
kloxo面板的lighttpd php mysql
zencart 1.3.9h
伪静态插件ultimate seo urls 2.101

zencart及ultimate seo urls插件的安装,网上有很多教程我们这里就不再赘述了。

您登录进kloxo之后,选择您的域名,然后在右边点 lighttpd地址重写规则 ,然后把下面的伪静态规则贴进去,然后点update。这样就配置好了lighttpd下的zencart基于ultimate seo urls插件的伪静态规则。
配置好规则之后您需要重启lighttpd才可以是伪静态规则生效。
怎么重启lighttpd,请参见http://rashost.com/blog/kloxo-newdomain

注意:
需要使用ultimate seo urls这个插件默认的seo.url.php文件,
如果您修改了seo.url.php则下面的规则无法工作
ultimate seo urls插件安装好的默认配置如下

登录zencart后台 -> Configuration -> SEO URLs -> Enter pages to allow rewrite


内容如下:
index, product_info, products_new, products_all, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4

ssh登录之后执行下面的命令升级lighttpd


yum update -y lighttpd
/etc/init.d/lighttpd restart

伪静态规则:

url.rewrite-if-not-file = (
"^/news$" => "index.php?main_page=news",
"^/page\.html\?chapter=(.*)&id=(.*)$"=>"/index.php?main_page=page&id=$2&chapter=$1",
"^/page\.html\?id=(.*)$"=>"/index.php?main_page=page&id=$1",
"^/(.*)-ezp-(.*)\.html(\?(.*))*$"=>"/index.php?main_page=page&id=$2",
"^/page_(.*)\.html$"=>"/index.php?main_page=page_$1",
"^/checkout\/cart\/(\?(.*))?$" => "/index.php?main_page=shopping_cart&$2",
"^/(.*)-p-(.*)\.html(\?(.*))?$" => "/index.php?main_page=product_info&products_id=$2&$4",
"^/(.*)-a-(.*)\.html(\?(.*))?$" => "index.php?main_page=news_article&article_id=$2&$4",
"^/(.*)-c-(.*)\.html(\?(.*))?$" => "/index.php?main_page=index&cPath=$2&$4",
"^/(.*)-pi-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=popup_image&pID=$2&$4",
"^/(.*)-m-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=index&manufacturers_id=$2&$4",
"^/(.*)-pr-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=product_reviews&product_id=$2&$4",
"^/(.*)-pri-([0-9] )\.html(\?(.*))?$" => "/index.php?main_page=product_reviews_info&product_id=$2&$4",
"^/checkout\/shipping_method\/(\?(.*))?$" => "/index.php?main_page=checkout_shipping&$2",
"^/news/archive/(.*)\.html$" => "/index.php?main_page=news_archive&date=$1",
"^/news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html(\?(.*))?$" => "index.php?main_page=news&date=$1-$2-$3&$4",
"^(.*)\.html(\?(.*))?$"=>"/index.php?main_page=$1&$3",
#"^(.*)\.html((.*))?$"=>"/index.php?main_page=$1&$3"
)

kloxo切换web服务器为apache后的bug修复

Posted by yar999 in lighttpd on 2010/08/20 with No Comments

在kloxo中切换web服务器为apache之后,重启kloxo的时候会报错

(network.c.336) SSL: error:00000000:lib(0):func(0):reason(0)

kloxo后台也进不去。

可以按照下面的方法解决

wget http://dl.rashost.com/kloxo/openssl-0.9.8e-12.el5_4.1.i686.rpm
rpm -ivh –force openssl-0.9.8e-12.el5_4.1.i686.rpm
/etc/init.d/kloxo restart

Back to Top

2007-2017 © 北京瑞豪开源科技有限公司 京ICP备13004995号-2