Welcome! Log In Create A New Profile

Advanced

Nginx rewrite for Maxsite CMS

August 31, 2010 02:28PM
Завяз с написанием реврайтов для CMS Maxsite.
Там даны только примеры реврайтов для apache (.htaccess), и то весьма невнятно:
[quote]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|uploads|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]
</IfModule>

На некотрых серверах вместо строчки:
RewriteRule . /index.php [L]
можно попробовать указать:
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]

Вариант для Nginx с апачем в качестве надстройки:
RewriteRule ^(.*)$ /index.php?$1 [L,QSA][/quote]
Понимай как хочешь... :-(
Через поиск никакого рабочего варианта реврайтов найти не удалось.

Пробовал прописать в конфиге nginx (он у меня без бэкенда) вариации типа:
[code]
server {
listen 80;
server_name net.open.ru net;

location / {
root /site/maxsite;
index index.php;

if ($query_string = !^(index\.php|uploads|robots\.txt|favicon\.ico)) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}

if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}


# if ($request_uri ~* ^.*/.*$) {
# rewrite ^/(\w*)/(.*)$ /$1/index.php?q=$2 last;
# break;
# }
}

location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico)$ {
root /site/maxsite;
#access_log off;
break;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /site/maxsite$fastcgi_script_name;
include fastcgi_params;
}
}
[/code]
При попытке нажать клавишу первой страницы CMS "Установить" не происходит корректная передача параметров другой странице. В результате, выдаётся пустое окно, хотя в лог пишется "200". Также некорректно обрабатываются несуществующие URL. Выдаётся ошибка типа:
[code]Table 'maxsite.mso_page' doesn't exist
SELECT `page_id` FROM (`mso_page`) WHERE `page_slug` = 'beliberda' OR `page_id` = 'beliberda' LIMIT 1
[/code]
К сожалению, в логах информации как обрабатывались реврайты нет, даже при установке уровня подробностей "info".

Буду очень благодарен за помощь в устранении ошибки в правилах реврайтов.
Subject Author Posted

Nginx rewrite for Maxsite CMS

Dmitriy_K August 31, 2010 02:28PM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 01, 2010 05:52AM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 01, 2010 10:16AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev September 01, 2010 06:04AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 03:14AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 03:30AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 03:41AM

Re: Nginx rewrite for Maxsite CMS

Aleksandr Sytar February 03, 2011 04:00AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 04:37AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 05:14AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 05:43AM

Re: Nginx rewrite for Maxsite CMS

Vovas August 23, 2011 08:28AM

Re: Nginx rewrite for Maxsite CMS

Igor Sysoev February 03, 2011 05:52AM

Re: Nginx rewrite for Maxsite CMS

Slava Kokorin February 03, 2011 06:20AM

Re: Nginx rewrite for Maxsite CMS

xopek February 03, 2011 06:51AM

Re: Nginx rewrite for Maxsite CMS

NiTr0 April 01, 2011 10:59AM

Re: Nginx rewrite for Maxsite CMS

Dmitriy_K September 03, 2010 01:34PM

Re: Nginx rewrite for Maxsite CMS

kolobok01 September 13, 2010 09:45PM

RE: Nginx rewrite for Maxsite CMS

maxhl September 15, 2010 07:42AM

Re: Nginx rewrite for Maxsite CMS

Vitaliy Lisenko September 15, 2010 01:36PM

Re: RE: Nginx rewrite for Maxsite CMS

kolobok01 September 16, 2010 09:14PM

Re: RE: Nginx rewrite for Maxsite CMS

kolobok01 September 17, 2010 02:11AM

Re: Nginx rewrite for Maxsite CMS

Vladislav V. Prodan September 17, 2010 01:44AM

Re: RE: Nginx rewrite for Maxsite CMS

Sergey Averyanov September 17, 2010 04:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 104
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready