If I have the following URL:
https://kl-office.com/directory
How can I configure Nginx to rewrite the above URL as:
https://kl-office.com
You could try this:
rewrite ^.*$ / permanent;
Although, this will rewrite any request to /
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.