Hello, everybody)
Can't solve problem with nginx rewrite url.
I'm using EC2. I installed nginx and php-fpm. Everuthing works fine, but when i ckick on http://ec2-54-247-184-104.eu-west-1.compute.amazonaws.com/catalog/zhenskie_sumki/ i get 404 error, i need to rewrite this url to http://ec2-54-247-184-104.eu-west-1.compute.amazonaws.com/?do=catalog&categoryid=zhenskie_sumki
i tried to write in nginx.conf this
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
# The default server is in conf.d/default.conf
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
location / {
rewrite ^/catalog/(.*)$ /?do=catalog&user=$1? last;
}
}
}
but i still get 404 not found. I know that it possible to do it, but i don't know where is problem. Please help me. Thanks))