[英]DNS Rewrite Rules Apache To Ngnix Translation
I need you help i use to successfully migrate my site from Apache to Ngnix but i trying to convert some DNS rewrite rules and till now with no success . 我需要你帮助我成功地将我的网站从Apache迁移到Ngnix,但我试图转换一些DNS重写规则,直到现在没有成功。 Can you please give me some translation help .
你能给我一些翻译帮助吗?
Rewrites that i wont to translate are : 重写我不会翻译的是:
RewriteCond %{HTTP_HOST} ^domain\.net\.mk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.net\.mk$
RewriteRule ^(.*)$ "http\:\/\/domain\.com\.mk\/$1" [R=301,L]
RewriteCond %{HTTP_HOST} ^domain\.mk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.mk$
RewriteRule ^(.*)$ "http\:\/\/domain\.com\.mk\/$1[R=301,L]
Thanks for you support , where do a need to put translated rewrites in my vhost template or in nginx.conf (single web site on VPS) 感谢您的支持,需要将翻译的重写放在我的vhost模板或nginx.conf(VPS上的单个网站)中
To redirect a number of domains to another domain use a separate server
block, for example: 要将多个域重定向到另一个域,请使用单独的
server
块,例如:
server {
listen 80;
server_name domain.net.mk www.domain.net.mk domain.mk www.domain.mk;
return 301 http://domain.com.mk$request_uri;
}
server {
listen 80;
server_name domain.com.mk;
...
}
See this document for more. 有关更多信息,请参见此文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.