Welcome! Log In Create A New Profile

Advanced

дублирование url php фреймворке yii

Posted by vladimircape 
дублирование url php фреймворке yii
July 19, 2012 04:42AM
Добрый день,новичок с nginx.
Настроиль чистый nginx без apache ,но почему-то при включенном rewrite
делая ajax запросы url дублируется постоянно и вырастает после каждого запроса.
к примеру был
site.ru/model/article/
после первого ajax запроса станет
site.ru/model/article/model/article
а потом еще
site.ru/model/article/model/article/model/article
вот сама настройка default.conf установлен на fedora 16
server {
listen 80;
server_name SiteName;
server_name_in_redirect off;

charset utf-8;

#access_log logs/host.access.log main;
root /srv/www/SiteName;
location = / { rewrite . /index.php last; }

location / {
#root /usr/share/nginx/html;
#root /srv/www/SiteName;
index index.php index.html index.htm;
#rewrite ^(.*) /index.php?q=$1 last;
#rewrite ^(.*)$ /index.php last;
if (!-e $request-filename)
{
rewrite ^/(.*)$ /index.php?/$1 last;
}
}
location = /robots.txt { if (-f $document_root/robots.txt) { rewrite . /robots.txt; } break; }
location /css/ {
break;
}
location /assets/ { break; }


error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
#Vladimir
#include /etc/nginx/fastcgi_params;

try_files $fastcgi_script_name =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/SiteName$fastcgi_script_name;
include fastcgi_params;

}


# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
location @index {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /srv/www/SiteName/index.php;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param QUERY_STRING q=$uri&$args;
}
}



Edited 1 time(s). Last edit at 07/19/2012 04:43AM by vladimircape.
Re: дублирование url php фреймворке yii
July 19, 2012 09:45AM
Чего здесь никто ничего не знает?
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 230
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