Lighttpd Rewrite Rules для различных ЦМС

Nov 01, 2010 18:56

Для чистых ссылок прописываем:

PrestaShop:

url.rewrite-once = (
"^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$" => "/img/p/$1-$2$3.jpg",
"^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$" => "/img/c/$1$2.jpg",
"^/lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" => "/product.php?id_product=$3&isolang;=$1$6" ,
"^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" =>"/product.php?id_product=$2&isolang;=$1&$4",
"^/lang-([a-z]{2})/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/cms.php?id_cms=$2&isolang;=$1&$4",
"^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/category.php?id_category=$2&isolang;=$1&$5" ,

"^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" => "/product.php?id_product=$2&$5" ,
"^/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?" =>"/product.php?id_product=$1&$4",
"^/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/category.php?id_category=$1&$4" ,
"^/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?" =>"/cms.php?id_cms=$1&$4" ,
"^/([0-9]+)__([a-zA-Z0-9-]*)(\?(.*))?" =>"/supplier.php?id_supplier=$1&$4" ,
"^/([0-9]+)_([a-zA-Z0-9-]*)(\?(.*))?" =>"/manufacturer.php?id_manufacturer=$1&$4",

"^/lang-([a-z]{2})/(\?(.*))?" => "/index.php?isolang=$1&$2"

)

ExpressionEngine:

url.rewrite-once = (
"/sitemap.xml" => "/sitemap.php",
"/(.*)\.(.*)" => "$0",
"/(images|admin|themes|favicon\.ico|robots\.txt)/" => "$0",
"/^(.*)\.html$" => "/index.php/$1",
"^/([^.]+)$" => "/index.php/$1"
)

Wordpress:

url.rewrite-once = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/keyword/([A-Za-z_0-9\-]+)/?$" => "/index.php?keyword=$1",
"^/.*?(\?.*)?$" => "/index.php$1"
)

Drupal:

url.rewrite = (
"^/(?!(misc|theme|module|site))([^?]*)\??(.*)$" => "/index.php?q=$2&$3"
)

MaxSite CMS:

url.rewrite-once = (
"^/(.*)\.(.*)" => "$0",
"^/([^.]+)$" => "/index.php/$1",
"^/$" => "/index.php"
)
Kandidat CMS
:

url.rewrite-once = (
"^/news-([0-9]*).html?"=>"index.php?whatpage=news&view=$1",
"^/news-page-([0-9]*).html?"=>"index.php?whatpage=news&newspage=$1",
"^/photo-cat-([-a-zA-Z0-9_]*)?-([0-9]*)?.html$"=>"index.php?whatpage=photo&cat=$1&page=$2",
"^/photo-cat-([-a-zA-Z0-9_]*).html?"=>"index.php?whatpage=photo&cat=$1",
"^/photo-([0-9]*).html?"=>"index.php?whatpage=photo&page=$1",
"^/admin/$"=>"/admin/$1",
"^/katalog-([0-9]*).html?"=>"index.php?whatpage=katalog&view=$1",
"^/katalog-page-([0-9]*).html?"=>"index.php?whatpage=katalog&katalogpage=$1",
"^/guestbook-([-a-zA-Z0-9_]*)-([0-9]*).html?"=>"index.php?whatpage=guestbook&$1=$2",
"^/([-a-zA-Z0-9_]*)/spage-([0-9]*).html?"=>"index.php?catpage=$1&spage=$2",
"^/([-a-zA-Z0-9_]*)/([-a-zA-Z0-9_]*)/spage-([0-9]*).html?"=>"index.php?catpage=$1&subcatpage=$2&spage=$3",
"^/([-a-zA-Z0-9_]*)/$"=>"index.php?catpage=$1",
"^/([-a-zA-Z0-9_]*)/([-a-zA-Z0-9_]*)/$"=>"index.php?catpage=$1&subcatpage=$2",
"^/([-a-zA-Z0-9_]*)?.html$"=>"index.php?whatpage=$1",
"^/([-a-zA-Z0-9_]*)/?([-a-zA-Z0-9_]*)?.html$"=>"index.php?catpage=$1&whatpage=$2",
"^/([-a-zA-Z0-9_]*)/?([-a-zA-Z0-9_]*)/?([-a-zA-Z0-9_]*)?.html$"=>"index.php?catpage=$1&subcatpage=$2&whatpage=$3",

)

maxsite cms, lighttpd, drupal, kandidat cms

Previous post Next post
Up