将镜像站点的功能列入白名单

时间:2014-02-07 16:13:43

标签: .htaccess

我真的需要帮助我的网站的镜像站点运行..我的网站是elementlimousine.com,镜像站点网址是elementslimousine.net

我不是一个技术人员,所以请原谅我的语言无知和简单。

我有一个网站,我通过第三方获得搜索引擎营销。他们这样做是做一个镜像站点(使用不同的URL),它将从原始站点获取信息并将其显示给用户。

但我们面临的问题是点击镜像站点网址时出现500错误。该团队表示正在发生这种情况,因为镜像站点经常与原始站点通话。因此,根据它们的唯一解决方案是白名单的IP地址:

74.122.36.157 204.14.212.132 74.122.37.11 74.122.36.0 - 74.122.36.255(256 IP) 74.122.37.0 - 74.122.37.255(256 IPs)

但它仍然无效,广告系列已暂停..所以现在elementslimousine.net工作了

  1. 我是否在htaccess文件中输入错误或错误的地方?
  2. 还有什么办法可以让镜像工作吗?
  3. 我将非常感谢您的帮助! 感谢

    根据其他帖子,我打开了我的.htacces文件并将代码更改为:

     # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    
    order allow, deny
    
    allow from 74.122.36.157
    allow from 204.14.212.132
    allow from 74.122.37.11
    allow from 74.122.36.0 – 74.122.36.255 
    allow from 74.122.37.0 – 74.122.37.255 
    
    # BEGIN wtwp_cache
    <IfModule mod_mime.c>
    
        # Text
        AddType text/css .css
        AddType application/x-javascript .js
        AddType text/html .html .htm
        AddType text/richtext .rtf .rtx
        AddType text/plain .txt
        AddType text/xml .xml
    
        # Image
        AddType image/gif .gif
        AddType image/x-icon .ico
        AddType image/jpeg .jpg .jpeg .jpe
        AddType image/png .png
        AddType image/svg+xml .svg .svgz
    
        # Video
        AddType video/asf .asf .asx .wax .wmv .wmx
        AddType video/avi .avi
        AddType video/quicktime .mov .qt
        AddType video/mp4 .mp4 .m4v
        AddType video/mpeg .mpeg .mpg .mpe
    
        # PDF
        AddType application/pdf .pdf
    
        # Flash
        AddType application/x-shockwave-flash .swf
    
        # Font
        AddType application/x-font-ttf .ttf .ttc
        AddType application/vnd.ms-fontobject .eot
        AddType application/x-font-otf .otf
    
        # Audio
        AddType audio/mpeg .mp3 .m4a
        AddType audio/ogg .ogg
        AddType audio/wav .wav
        AddType audio/wma .wma
    
        # Zip/Tar
        AddType application/x-tar .tar
        AddType application/x-gzip .gz .gzip
        AddType application/zip .zip
    </IfModule>
    
    <IfModule mod_expires.c>
        ExpiresActive On
    
        # Text
        ExpiresByType text/css A31536000
        ExpiresByType application/x-javascript A31536000
        ExpiresByType text/html A3600
        ExpiresByType text/richtext A3600
        ExpiresByType text/plain A3600
        ExpiresByType text/xml A3600
    
        # Image
        ExpiresByType image/gif A31536000
        ExpiresByType image/x-icon A31536000
        ExpiresByType image/jpeg A31536000
        ExpiresByType image/png A31536000
        ExpiresByType image/svg+xml A31536000
    
        # Video
        ExpiresByType video/asf A31536000
        ExpiresByType video/avi A31536000
        ExpiresByType video/quicktime A31536000
        ExpiresByType video/mp4 A31536000
        ExpiresByType video/mpeg A31536000
    
        # PDF
        ExpiresByType application/pdf A31536000
    
        # Flash
        ExpiresByType application/x-shockwave-flash A31536000
    
        # Font
        ExpiresByType application/x-font-ttf A31536000
        ExpiresByType application/vnd.ms-fontobject A31536000
        ExpiresByType application/x-font-otf A31536000
    
        # Audio
        ExpiresByType audio/mpeg A31536000
        ExpiresByType audio/ogg A31536000
        ExpiresByType audio/wav A31536000
        ExpiresByType audio/wma A31536000
    
        # Zip/Tar
        ExpiresByType application/x-tar A31536000
        ExpiresByType application/x-gzip A31536000
        ExpiresByType application/zip A31536000
    </IfModule>
    <FilesMatch "\.(?i:css|js|htm|html|rtf|rtx|txt|xml|gif|ico|jpg|jpeg|jpe|png|svg|svgz|asf|asx|wax|wmv|wmx|avi|mov|qt|mp4|m4v|mpeg|mpg|mpe|pdf|swf|ttf|ttc|eot|otf|mp3|m4a|ogg|wav|wma|tar|gz|gzip|zip)$">
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header append Cache-Control "public, must-revalidate, proxy-revalidate"
            Header unset ETag
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(?i:css|js|gif|ico|jpg|jpeg|jpe|png|pdf|swf|ttf|ttc|eot|otf)$">
        <IfModule mod_headers.c>
            Header unset Set-Cookie
        </IfModule>
    </FilesMatch>
    # END wtwp_cache
    
    # BEGIN wtwp_security
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^wp-admin/includes/ - [F,L]
        RewriteRule !^wp-includes/ - [S=3]
        RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
        RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
        RewriteRule ^wp-includes/theme-compat/ - [F,L]
    </IfModule>
    <Files "wp-config.php">
        Order allow,deny
        Deny from all
    </Files>
    Options -Indexes
    # END wtwp_security
    

1 个答案:

答案 0 :(得分:0)

存在一些语法错误。

尝试此块并替换相关代码:

order deny,allow
deny from All
allow from 74.122.36.157
allow from 204.14.212.132
allow from 74.122.37.11
allow from 74.122.36.0 74.122.36.255 
allow from 74.122.37.0 74.122.37.255 

有关它的详细信息:http://httpd.apache.org/docs/current/mod/mod_access_compat.html

相关问题