我已经注册了3个域与.com,.co.in和.in扩展。我的.com域是托管的。我希望用户在输入.co.in和.in urls时被重定向到.co.in网站。我该怎么做?
发布于 2019-05-25 15:26:33
这个问题有两种解决方案
CNAME记录在DNS-服务器上。
IN CNAME example.com.此DNS记录将域重定向(例如example.io )到example.com。如果您不想重定向子域,例如sub.example.io,您需要使用:
sub IN CNAME example.com.使用the服务器重定向
NGINX:
server {
listen 80;
server_name example.io;
return 301 http://example.com$request_uri;
}阿帕奇:
<VirtualHost *:80>
ServerName example.io
Redirect 301 / http://example.com
</VirtualHost>Apache可能需要更改。
发布于 2011-04-19 15:02:39
记住:您的.co.in和.in域必须设置为“指向”您的cpanel set主机才能正常工作(该域的名称服务器设置为您的cpanel主机)。您还需要有2个(或更多)“停放域”在您的cpanel包上可用。
https://serverfault.com/questions/261221
复制相似问题