Answer the question
In order to leave comments, you need to log in
How can I set NGINX to understand GET parameters without the "?" sign?
Hello!
Guru NGINX tell me pliz.
Moved a site from Apache, where the URL "mysite.com/katalog/kaminnye-topki/&filter=p:31875,64755..." worked, but now it doesn't work. but if there is a question mark ("?") defining the beginning of the parameters, then everything is buzzing. ("mysite.com/katalog/kaminnye-topki/?&filter=p:31875,64755..." ).
How to configure NGINX to understand GET parameters without "?" ?
write about what you need necessarily a question mark, it is not necessary. I know it. I don't want to get into the code.
I am attaching the config:
server {
listen 46.30.42.1:80;
server_name mysite.ru www.mysite.ru;
root /home/mysite/web/mysite.ru/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/mysite.ru.log combined;
access_log /var/log/nginx/domains/mysite.ru.bytes bytes;
error_log /var/log/nginx/domains/mysite.ru.error.log error;
location / { try_files $uri @opencart; }
location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; }
location ~ /\.ht { deny all; }
location ~* (\.(tpl|ini))$ { deny all; }
if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; }
location /Immortal { index index.php; }
location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ {
add_header Pragma "public";
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
log_not_found off;
expires 90d;
}
# Vqmod settings
# Add trailing slash to */vqmod/install requests.
rewrite /vqmod/install$ $scheme://$host$uri/ permanent;
# Run index.php on /vqmod/install calls
location /vqmod/install/ {
index index.php;
}
# Nginx configuration of vqmod htaccess
location /home/mysite/web/mysite.ru/public_html/vqmod/ {
location ~ \.(xml|cache) {
deny all;
}
}
# End Vqmod settings
location ~* .(jpg|jpeg|gif|css|png)$ {
access_log off;
expires 10d;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question