after hours of trying and google i thought my last chance to get it solved is here.
i have the following problem:
- A Wordpress page is running under myperfectshop.com
- The shop just have one product at the moment, which is located under myperfectshop.com/product/first
- Till there are further products i want that everyone will get redirected from the URL "/" to "/product/first"
- This should happen with a proxy pass, so that the URL will remain "/"
i have tried the following code:
...
location = / {
proxy_pass https://myperfectshop.com/product/first
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
...
But this example will end up in an infinity loop for the root path. all other paths are working fine.
Can somebody please explaine me what i am doing wrong?
Thanks in advance.