Перейти к содержанию
Официальный форум поддержки Simpla

Рекомендуемые сообщения

  • 1 год спустя...
$HTTP["host"] =~ "<host_regex>" {

    url.rewrite-once = (
        # Каталог товаров
        "^/catalog/([^/]+)/?$"                   =>  "index.php?module=ProductsView&category=$1",
        "^/catalog/([^/]+)/([^/]+)/?$"           =>  "index.php?module=ProductsView&category=$1&brand=$2",
        
        "^/products/([^/]+)/?$"                  =>  "index.php?module=ProductView&product_url=$1",
        "^/products/?$"                          =>  "index.php?module=ProductsView",
        
        "^/brands/([^/]+)/?$"                    =>  "index.php?module=ProductsView&brand=$1",
        "^/brands/([^/]+)/page_([^/]+)/?$"       =>  "index.php?module=ProductsView&brand=$1&page=$2",
        
        # Поиск товаров
        "^/search/([^/]+)/?$"                    =>  "index.php?module=ProductsView&keyword=$1",
        "^/search/?$"                            =>  "index.php?module=ProductsView",
        
        # Блог
        "^/blog/([^/]+)/?$"                      =>  "index.php?module=BlogView&url=$1",
        "^/blog/?$"                              =>  "index.php?module=BlogView",
        
        # Корзина и заказы
        "^/cart/?$"                              =>  "index.php?module=CartView",
        "^/cart/([^/]+)/?$"                      =>  "index.php?module=CartView&add_variant=$1",
        "^/cart/remove/([^/]+)/?$"               =>  "index.php?module=CartView&delete_variant=$1",
        "^/order/([^/]+)/?$"                     =>  "index.php?module=OrderView&url=$1",
        "^/order/?$"                             =>  "index.php?module=OrderView",
        
        # Для пользователей
        "^/user/login/?$"                        =>  "index.php?module=LoginView",
        "^/user/register/?$"                     =>  "index.php?module=RegisterView",
        "^/user/logout/?$"                       =>  "index.php?module=LoginView&action=logout",
        "^/user/password_remind/?$"              =>  "index.php?module=LoginView&action=password_remind",
        "^/user/password_remind/([0-9a-z]+)/?$"  =>  "index.php?module=LoginView&action=password_remind&code=$1",
        "^/user/?$"                              =>  "index.php?module=UserView",
        
        # Google sitemap
        "^/sitemap.xml?$"                        =>  "sitemap.php",
        
        # XML
        "^/yandex.xml?$"                         =>  "yandex.php",
        
        # feedback
        "^/contact/?$"                           =>  "index.php?module=FeedbackView",
        
        #downloads
        "^/order/([^/]+)/([^/]+)/?$"             =>  "index.php?module=OrderView&url=$1&file=$2",
    )

    url.rewrite-if-not-file = (
        # Статические страницы
        "^/([^/]*)/?$" => "index.php?module=PageView&page_url=$1",
        "^/?$"        => "index.php?module=MainView&page_url=",

        # Ресайз картинок на лету
        "^/files/products/([^\?]+)(\?(.*))?" => "resize/resize.php?file=$1&token=$3"
    )
}
 

 

Только что сам задался таким вопросом.

В интеренете найти не смог -> пришлось составлять правила самому.  Надеюсь еще кому-нибудь пригодятся...

Версия cms - Simpla 2.2.4

Ссылка на сообщение
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

Загрузка...
×
×
  • Создать...