“由于可能的配置错误,请求超出了10个内部重定向的限制”如果我通过IP地址访问我的站点

时间:2016-09-19 11:25:13

标签: wordpress apache .htaccess amazon-ec2

我将我的网站部署到EC2 aws web服务,如果我按域访问我的网站(Ex:example.com),它工作正常但如果我通过IP地址访问我的网站,我得到了以下错误(例如:54.175.187) .XXX)

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

这是我的.htaccess

# 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>

我的虚拟主机配置如下,

<VirtualHost example.com:80>        
    ServerName mysite.com
    ServerAdmin webmaster@localhost
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule ^/(.*)$ https://example.com/$1 [L,R=301,E=nocache:1]
    DocumentRoot /var/www/html/blog/web
    <Directory /var/www/html/blog/web >
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All                
    </Directory>       
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
你能帮帮我吗?感谢。

0 个答案:

没有答案