2017-09-27 47 views

回答

1

嗨,大家好,这是帮助任何人谁与其他领域的问题指向那里Origin IP和索引更高,然后他们等等!首先,你需要做的

的是确保在httpd.conf文件mod_rewrite.so模块启用

Include conf.modules.d/*.conf 
LoadModule rewrite_module modules/mod_rewrite.so 

而且你还必须确保你允许的.htaccess文件覆盖所有: - “WWW”

# AllowOverride controls what directives may be placed in .htaccess files. 
    # It can be "All", "None", or any combination of the keywords: 
    # Options FileInfo AuthConfig Limit 
    # 
    AllowOverride All 

一旦做到这一点,你既可以设置301永久重定向所以在我的情况下,所有你需要做的是设置的forwader “yourdomain.com”,并将其转发到https://或http://“yourdomain.com”的重写。为此,您可以在您的DNS管理你的页面设置或重写条件下复制此代码,以及到您的.htaccess文件现在

Options FollowSymLinks 

RewriteEngine On 
RewriteBase/

RewriteCond %{HTTPS_HOST} !^https://yourdomain.com$ 
RewriteRule ^/?(.*) https://www.my-domain.com/$1 [QSA,R=301,L] 

,你可以看到我所建立的HTTPS重写://连接 - 如果你想重写http,只需删除S等等第四!

我的问题是现在我不知道如何阻止我的“targetdomain.com”能够访问我的起源数据!

相关问题