How to rewrite url website in nginx when there are many sites in the server
P粉697408921
P粉697408921 2024-01-10 17:18:58
0
1
407

I want to rewrite url in nginx, but the server Ubuntu has many sites.

Rewrite friendly url in php website.

P粉697408921
P粉697408921

reply all(1)
P粉768045522

You can use rewrite rules from nginx possibilities. For example

server {
   listen 80;
   listen 443 ssl;
   server_name www.site1.com site1.com;


   location=/your-url
   {

     rewrite a.php= ^my-desires([0-9]+)$ break;
   }

   ....
   ....
}

Also, you can view rewrite-modules from https://www.nginx.com/blog/creating-nginx-rewrite-rules/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template