Hello
Thanks for your reply.
If I remove the three lines, i get a 404 error. As a reminder, and maybe a little bit more clear :) here is the configuration.
Here is the directory path:
/var/www/domain.fr/web/subdomain/directory
my nginx conf is:
root /var/www/domain.fr/web
if ($http_host = "subdomain.domain.fr") {
rewrite ^(?!/\b(subdomain|stats|error)\b)/(.*)$ /subdomain/$2 last;
}
The if statement is before all of location directives.
After purging my cache browser, this is what I get:
when i reach http://subdomain.domain.fr/directory i'm redirected to http://subdomain.domain.fr/subdomain/directory (this is not what i want, i want http://subdomain.domain.fr/directory)
Thanks fo your help,
Best regards,
Nico