奥飞火千万电 发表于 2018-11-28 06:49:36

Apache环境下配置Rewrite规则

复制内容到剪贴板Code:  RewriteEngine On
  #RewriteBase /
  # direct one-word access
  RewriteRule ^index\.html$ index\.php
  RewriteRule ^category$ index\.php

  # access any object by its numeric>  RewriteRule ^feed-c(+)\.xml$ feed\.php\?cat=$1
  RewriteRule ^feed-b(+)\.xml$ feed\.php\?brand=$1
  RewriteRule ^feed\.xml$ feed\.php
  RewriteRule ^category-(+)-b(+)-min(+)-max(+)-attr([^-]*)-(+)-(.+)-(+)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8
  RewriteRule ^category-(+)-b(+)-min(+)-max(+)-attr([^-]*)(.*)\.html$ category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5
  RewriteRule ^category-(+)-b(+)-(+)-(.+)-(+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5
  RewriteRule ^category-(+)-b(+)-(+)(.*)\.html$ category\.php\?id=$1&brand=$2&page=$3
  RewriteRule ^category-(+)-b(+)(.*)\.html$ category\.php\?id=$1&brand=$2
  RewriteRule ^category-(+)(.*)\.html$ category\.php\?id=$1
  RewriteRule ^goods-(+)(.*)\.html$ goods\.php\?id=$1
  RewriteRule ^article_cat-(+)-(+)-(.+)-(+)(.*)\.html$ article_cat\.php\?id=$1&page=$2&sort=$3&order=$4
  RewriteRule ^article_cat-(+)-(+)(.*)\.html$ article_cat\.php\?id=$1&page=$2
  RewriteRule ^article_cat-(+)(.*)\.html$ article_cat\.php\?id=$1
  RewriteRule ^article-(+)(.*)\.html$ article\.php\?id=$1
  RewriteRule ^brand-(+)-c(+)-(+)-(.+)-(+)\.html brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5
  RewriteRule ^brand-(+)-c(+)-(+)(.*)\.html brand\.php\?id=$1&cat=$2&page=$3
  RewriteRule ^brand-(+)-c(+)(.*)\.html brand\.php\?id=$1&cat=$2
  RewriteRule ^brand-(+)(.*)\.html brand\.php\?id=$1
  RewriteRule ^tag-(.*)\.html search\.php\?keywords=$1
  RewriteRule ^snatch-(+)\.html$ snatch\.php\?id=$1
  RewriteRule ^group_buy-(+)\.html$ group_buy\.php\?act=view&id=$1
  RewriteRule ^auction-(+)\.html$ auction\.php\?act=view&id=$1 SupeV1.0beta 规则

页: [1]
查看完整版本: Apache环境下配置Rewrite规则