Поиск
Показаны результаты для тегов '.htaccess'.
Найдено 1 результат
-
Интересует правильный конфиг для nginx У меня выходит такое но что то оно работает не особо: server { listen 80; listen [::]:80; server_name example.com; root /home/user/www; include snippets/misc.conf; location / { index index.php; autoindex on; try_files $uri $uri/ /index.php?$query_string; include snippets/cache-off.conf;} location ~ \.php$ {include snippets/fastcgi-php.conf;fastcgi_pass php8;} location /simpla { auth_basic "New Simpla CMS"; auth_basic_user_file /home/user/www/simpla/.passwd; } charset utf-8; error_page 404 /404; error_page 401 /password.php; rewrite ^/admin_panel/?$ /simpla last; rewrite ^/ru/(.*)$ /$1?lang=ru last; rewrite ^/uk/(.*)$ /$1?lang=uk last; rewrite ^/en/(.*)$ /$1?lang=en last; rewrite ^/pl/(.*)$ /$1?lang=pl last; rewrite ^/catalog/([^/]+)/?$ /index.php?module=ProductsView&category=$1 last; rewrite ^/catalog/([^/]+)/([^/]+)/?$ /index.php?module=ProductsView&category=$1&brand=$2 last; rewrite ^/products/([^/]+)/?$ /index.php?module=ProductView&product_url=$1 last; rewrite ^/products/?$ /index.php?module=ProductsView last; rewrite ^/brands/([^/]+)/?$ /index.php?module=ProductsView&brand=$1 last; rewrite ^/brands/([^/]+)/page_([^/]+)/?$ /index.php?module=ProductsView&brand=$1&page=$2 last; rewrite ^/search/([^/]+)/?$ /index.php?module=ProductsView&keyword=$1 last; rewrite ^/search/?$ /index.php?module=ProductsView last; rewrite ^/blog/([^/]+)/?$ /index.php?module=BlogView&url=$1 last; rewrite ^/blog/?$ /index.php?module=BlogView last; rewrite ^/seo/([^/]+)/?$ /index.php?module=SeoView&url=$1 last; rewrite ^/seo/?$ /index.php?module=SeoView last; rewrite ^/products/sinquiry/([a-z0-9-]+)/(.*)$ /index\.php\?module=ProductsView&sinquiry=$1&keyword=$2 last; rewrite ^/compare/?$ /index.php?module=CompareView last; rewrite ^/compare/([^/]+)/?$ /index.php?module=CompareView&product_url=$1 last; rewrite ^/compare/remove/([^/]+)/?$ /index.php?module=CompareView&remove_product_url=$1 last; rewrite ^/wishlist/?$ /index.php?module=WishlistView last; rewrite ^/wishlist/([^/]+)/?$ /index.php?module=WishlistView&product_url=$1 last; rewrite ^/wishlist/remove/([^/]+)/?$ /index.php?module=WishlistView&remove_product_url=$1 last; rewrite ^/cart/?$ /index.php?module=CartView last; rewrite ^/cart/([^/]+)/?$ /index.php?module=CartView&add_variant=$1 last; rewrite ^/cart/remove/([^/]+)/?$ /index.php?module=CartView&delete_variant=$1 last; rewrite ^/order/([^/]+)/?$ /index.php?module=OrderView&url=$1 last; rewrite ^/order/?$ /index.php?module=OrderView last; rewrite ^/user/login/?$ /index.php?module=LoginView last; rewrite ^/user/register/?$ /index.php?module=RegisterView last; rewrite ^/user/logout/?$ /index.php?module=LoginView&action=logout last; rewrite ^/user/password_remind/?$ /index.php?module=LoginView&action=password_remind last; rewrite ^/user/password_remind/([0-9a-z]+)/?$ /index.php?module=LoginView&action=password_remind&code=$1 last; rewrite ^/user/?$ /index.php?module=UserView last; rewrite ^/sitemap.xml?$ /sitemap.php last; rewrite ^/yandex.xml?$ /yandex.php last; rewrite ^/contacts/?$ /index.php?module=FeedbackView last; rewrite ^/order/([^/]+)/([^/]+)/?$ /index.php?module=OrderView&url=$1&file=$2 last; location ~ "^/([^/]*)/?$" { try_files $uri $uri/ /index.php?module=PageView&page_url=$1; } rewrite ^/?$ index.php?module=MainView&page_url= last; location ~ "^/files/products/(.+)" { try_files $uri $uri/ /resize/resize.php?file=$1&token=$query_string; } }