Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2228965
  • 博文数量: 533
  • 博客积分: 8689
  • 博客等级: 中将
  • 技术积分: 7046
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-26 10:00
文章分类

全部博文(533)

文章存档

2024年(2)

2023年(4)

2022年(16)

2014年(90)

2013年(76)

2012年(125)

2011年(184)

2010年(37)

分类: LINUX

2011-09-20 11:37:52









ecshop for apache  伪静态


    DocumentRoot /data0/software/cosdrsdadsd
    ServerName
    ServerAlias  converop.com
    
   
RewriteEngine On
RewriteRule ^(.*)/index.html$                               $1/index\.php                                
RewriteRule ^(.*)/category$                                 $1/index\.php         
RewriteRule ^(.*)/feed-c([0-9]+).xml$                       $1/feed\.php\?cat=$2   
RewriteRule ^(.*)/feed-b([0-9]+).xml$                       $1/feed\.php\?brand=$2  
RewriteRule ^(.*)/feed.xml$                                 $1/feed\.php 
RewriteRule ^(.*)/message\.html$                             $1/message\.php\                                [L] 
RewriteRule ^(.*)/message-([0-9]+)\.html$                      $1/message\.php\?page=$2                      [L]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)\.html$         $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9   [L]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)-(.+)\.html$   $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6&page=$7&sort=$8&order=$9&dispaly=$10  [L]
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)\.html$                                   $1/category\.php\?id=$2&brand=$3&price_min=$4&price_max=$5&filter_attr=$6  [L]                        
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html$                                             $1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6  [L]                                        
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)\.html$                                                              $1/category\.php\?id=$2&brand=$3&page=$4  [L]                                                         
RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)\.html$                                                                       $1/category\.php\?id=$2&brand=$3  [L]                                                                
RewriteRule ^(.*)/tttt-([0-9]+)\.html$                                                                                           $1/category\.php\?id=$2   [L]                           
RewriteRule ^(.*)/goods-([0-9]+)\.html$                                                                                              $1/goods\.php\?id=$2  [L]    
RewriteRule ^(.*)/goodsinfor-([0-9]+)\.html$                                                                        $1/goodsinfor\.php\?id=$2    [L] 
RewriteRule ^(.*)/goodssn-([0-9]+)\.html$                                                                           $1/goodssn\.php\?id=$2       [L] 
RewriteRule ^(.*)/goodscomment-([0-9]+)\.html$                                                                      $1/goodscomment\.php\?id=$2  [L] 
RewriteRule ^(.*)/goodsnew-([0-9]+)\.html$                                                                          $1/goodsnew\.php\?id=$2      [L] 
RewriteRule ^(.*)/goodsrelate-([0-9]+)\.html$                                                                       $1/goodsrelate\.php\?id=$2   [L] 
RewriteRule ^(.*)/goodsconverseinfo-([0-9]+)\.html$                                  $1/goodsconverseinfo\.php\?id=$2                            [L]                              
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html$  $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5   [L]
RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)\.html$                   $1/article_cat\.php\?id=$2&page=$3                  [L]
RewriteRule ^(.*)/article_cat-([0-9]+)\.html$                            $1/article_cat\.php\?id=$2                          [L]
RewriteRule ^(.*)/article-([0-9]+)\.html$                                $1/article\.php\?id=$2                              [L]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html   $1/brand\.php\?id=$2&cat=$3&page=$4&sort=$5&order=$6  [L]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)\.html                $1/brand\.php\?id=$2&cat=$3&page=$4                  [L]
RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)\.html                         $1/brand\.php\?id=$2&cat=$3                          [L]
RewriteRule ^(.*)/brand-([0-9]+)\.html                                   $1/brand\.php\?id=$2                                 [L]
RewriteRule ^(.*)/tag-\.html                                             $1/search\.php\?keywords=$2                          [L]
RewriteRule ^(.*)/snatch-([0-9]+)\.html$                                      $1/snatch\.php\?id=$2                              [L]  
RewriteRule ^(.*)/group_buy-([0-9]+)\.html$                                   $1/group_buy\.php\?act=view&id=$2    [L]
RewriteRule ^(.*)/assistant/([a-zA-Z]+)/([a-zA-Z]+)\/$                                          $1/assistant\.php\?parent_cat_id=$2&attr_value=$3 [L]
RewriteRule ^(.*)/assistant/([a-zA-Z]+)\/$                                                                      $1/assistant\.php\?parent_cat_id=$2 [L]
RewriteRule ^(.*)/assistant/([a-zA-Z]+)/([a-zA-Z]+)-([a-zA-Z]+)\/$                      $1/assistant\.php\?parent_cat_id=$2&attr_value=$3&grandchild_cat_name=$4     [L]

RewriteRule ^(.*)/kwzm.html$                                   $1/kwzm\.php  [L]
#RewriteRule ^(.*)/goods-([0-9]+)\.html$                                  $1/goods\.php\?id=$2                                 [L] 
RewriteRule ^(.*)/kwzm-([0-9]+)\.html$                                   $1/kwzm_info\.php\?city_id=$2                   [L]
RewriteRule ^(.*)/kwzm-pro-([0-9]+)\.html$                                   $1/kwzm_info\.php\?province_id=$2             [L]
RewriteRule ^(.*)/city-([0-9]+)\.html$                                   $1/city_kwzm_info\.php\?province_id=$2              [L]
RewriteRule ^(.*)/city-ct-([0-9]+)\.html$                                   $1/city_kwzm_info\.php\?city_id=$2                 [L]
RewriteRule ^(.*)/topic-([0-9]+)\.html$                                   $1/topic\.php\?topic_id=$2                 [L]

RewriteRule ^(.*)/commenton.html$                       $1/commenton\.php                               [L] 
RewriteRule ^(.*)/commentcat-([0-9]+)\.html$            $1/commenton\.php\?cat_id=$2                    [L] 
RewriteRule ^(.*)/commentcat-([0-9]+)-([0-9]+)\.html$   $1/commenton\.php\?cat_id=$2&$page_id=$3        [L] 
RewriteRule ^(.*)/comment-g([0-9]+)-cm([0-9]+)\.html$   $1/com_goods\.php\?id=$2&gc_id=$3               [L]  

  


#     Options FollowSymLinks
#    Options Indexes FollowSymLinks ExecCGI Includes
#    AllowOverride ALL
#    Order allow,deny
#    Allow from all
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common

























 [/usr/local/nginx/conf]# cat ecshop_rewrite.conf 
location ~ ^(/images/).*\.(php|php5)?$
{
  return 403;
}
location ~ .*\.(php|php5)?$
{
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
        expires      30d;
}
location ~ .*\.(js|css)?$
{
        expires      1h;
}

location / {
if (!-e $request_filename)
{
 rewrite  "^/index.html$" /index.php last;
                
                rewrite  "^/category$" /index.php last;
                rewrite  "^/kwzm.html$"                  /kwzm.php                          last;
                rewrite  "^/kwzm-pro-([0-9]+)(.*).html$" /kwzm_info.php?province_id=$1      last;
                rewrite  "^/city-([0-9]+)(.*).html$"     /city_kwzm_info.php?province_id=$1 last;
                rewrite  "^/city-ct-([0-9]+)(.*).html$"  /city_kwzm_info.php?city_id=$1     last;
                # access any object by its numeric identifier
                rewrite  "^/feed-c([0-9]+)\.xml$" /feed.php?cat=$1 last;
                rewrite  "^/feed-b([0-9]+)\.xml$" /feed.php?brand=$1 last;
                rewrite  "^/feed-type([^-]+)\.xml$" /feed.php?type=$1 last;
                rewrite  "^/feed\.xml$" /feed.php last;

                rewrite  "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
                rewrite  "^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$" /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
                rewrite  "^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
                rewrite  "^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$" /category.php?id=$1&brand=$2&page=$3 last;
                rewrite  "^/category-([0-9]+)-b([0-9]+)(.*).html$" /category.php?id=$1&brand=$2 last;
                rewrite  "^/category-([0-9]+)(.*).html$" /category.php?id=$1 last;

                rewrite  "^/goods-([0-9]+)(.*).html$" /goods.php?id=$1 last;

                rewrite  "^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
                rewrite  "^/article_cat-([0-9]+)-([0-9]+)(.*).html$" /article_cat.php?id=$1&page=$2 last;
                rewrite  "^/article_cat-([0-9]+)(.*).html$" /article_cat.php?id=$1 last;

                rewrite  "^/article-([0-9]+)(.*).html$" /article.php?id=$1 last;

                rewrite  "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html$" /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
                rewrite  "^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html$" /brand.php?id=$1&cat=$2&page=$3 last;
                rewrite  "^/brand-([0-9]+)-c([0-9]+)(.*).html$" /brand.php?id=$1&cat=$2 last;
                rewrite  "^/brand-([0-9]+)(.*).html$" /brand.php?id=$1 last;

                rewrite  "^/tag-(.*).html$" /search.php?keywords=$1 last;
                rewrite  "^/snatch-([0-9]+).html$" /snatch.php?id=$1 last;
                rewrite  "^/group_buy-([0-9]+).html$" /group_buy.php?act=view&id=$1 last;
                rewrite  "^/auction-([0-9]+).html$" /auction.php?act=view&id=$1 last;

                rewrite  "^/exchange-id([0-9]+)(.*).html$" /exchange.php?id=$1&act=view last;
                rewrite  "^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
                rewrite  "^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
                rewrite  "^/exchange-([0-9]+)-([0-9]+)(.*).html$" /exchange.php?cat_id=$1&page=$2 last;
                rewrite  "^/exchange-([0-9]+)(.*).html$" /exchange.php?cat_id=$1 last;

                rewrite "^/commenton.html$"                             /commenton.php                          last;
                rewrite "^/commentcat-([0-9]+)(.*)\.html$"              /commenton.php?cat_id=$1                last;
#               rewrite "^/commentcat-([0-9]+)-([0-9]+)(.*)\.html$"     /commenton.php?cat_id=$1&$page_id=$2    last;
                rewrite "^/comment-g([0-9]+)-cm([0-9]+)(.*)\.html$"     /com_goods.php?id=$1&gc_id=$2           last;
}
}
root@web48 [/usr/local/nginx/conf]# 

阅读(8408) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~