does anyone know the rewrite rule for nginx to configure random redirects to a domain name?
is a parent domain name that is randomly distributed and redirected to one of several subdomains.
does anyone know the rewrite rule for nginx to configure random redirects to a domain name?
is a parent domain name that is randomly distributed and redirected to one of several subdomains.
Oh, are you talking about load balancing? Here is a piece of Nginx load balance that you can take a closer look at. It is roughly written as follows:
http {
upstream myapp1 {
server srv1.example.com;
server srv2.example.com;
server srv3.example.com;
}
server {
listen 80;
location / {
proxy_pass http://myapp1;
}
}
}
I hope I can help you.
Previous: A question about logical structure and physical storage structure of data structure
Next: How to realize cropping and proportional scaling of pictures in Vue
rewrite rules: RewriteRule (.*) (.*) (.*) index .html index.php?p=$1&c=$2&a=$3 [QSA] access Home Blog blog index.html?page=2 can access index.php?p=Home&c=Blog&c=blog&page=2 normally but when the original link is index.php?p=Home&c=Blog&a...
there was a zz_index.asp page in the previous project, but now we have made a whole website with apache+php, but the URL of zz_index.asp has printed a lot of QR codes and cannot be modified, so I want to use the Rewrite function of apache: . Jump zz_...
there was a zz_index.asp page in the previous project, but now we have made a whole website with apache+php, but the URL of zz_index.asp has printed a lot of QR codes and cannot be modified, so I want to use the Rewrite function of apache: . Jump zz_...
there are several URLwww.example.com abc 1.html www.example.com bdc 3.html www.example.com utf 2.html in this form. You want to redirect to the corresponding test.example.com abc 1.html test.example.com bdc 3.html test.example.com utf 2.html . Dir...
for example, WordPress s Chinese official website: https: cn.wordpress.org, I add a few slashes to this URL, so: https: cn.wordpress.org , it will automatically jump to the normal URL. segmentfault.com do any great gods know how this is achie...
server { listen 80; server_name test.com; root "D: test.com "; location { index index.html index.htm index.php; } location ~ .php(.*)$ { rewrite ^ (.*)$ index.php $1 break; proxy_set_header Host $host; ...
RewriteRule ^user order$ user order.php because I don t know how to turn on the words, I can t find , so I come to see if anyone knows . the one above can rewrite a single php want to see if you can specify a folder for example RewriteRule ^user ...
problem description: www. * .com jdk member login index.php set pseudo-static jump to login-member-index.html contact with this jump rule for the first time. I hope you can give me some advice. Thank you . original pseudo static rule. You can a...
I used htaccess to obscure all my web site profile names RewriteRule ^xxx$ xxx.php it s just hypothetical that someone doesn t have a chat to call. Can php make it unable to find the web? ...
reason because someone else s domain name needs to be attached to their own server, but the original path of textual connection is different, it may fail for example, it is originally http: love.me 12939. The number of articles will be added to m...
Update suppose there is a domain named abc.com I rewrite the domain using htaccess DocumentRoot Web root is I rewrote the src blog.php file to abc.com blog , so I hid the filename . RewriteRule ^blog$ src blog.php I went to the linod...
url styles are available as follows s p-$1-$2-$3-$4-$5-$6-$7-$8-$9-$10-$11.html want to replace-in url with _ what are the rules for redirecting? ...
RewriteRule ^products ([^ ]+) ([^ ]+)$ review product.php?prod_id=$1&red_id=$2 I set this rewrite but I just found a problem: there must be prod_id and red_id to I red_id is selective, prod_id is necessary so what I want to do is: when I ...
Nginx rewrite is currently a secondary directory (including all the following) http: www.abc.cn en . how to redirect to the root directory of another domain name: http: www.abc.com . ...
requirements are as follows: match abb *&%5E%25$ redirect abb how to write rewrite ...
there is a paragraph in the example of the conversion of URLs from non-www to www in the official Apache HTTPD documentation. RewriteCond %{HTTP_HOST} !^www .example .com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^ ?(.*) http: www.example.com $1...
RewriteRule ^admin user$ admin user.php the only thing I can write now is this hidden method to create one file at a time and then put it in .htaccess in the root directory of the website , but what I want to implement now is that all the php fil...