Wordpress &引用;由于可能的配置错误,请求超出了10个内部重定向的限制”;如果我通过IP地址访问我的站点
我将我的站点部署到EC2 aws web服务,如果我通过域(Ex:example.com)访问我的站点,它工作得很好,但是如果我通过IP地址(Ex:54.175.187.xxx)访问我的站点,我会得到下面的错误 这是我的.htaccessWordpress &引用;由于可能的配置错误,请求超出了10个内部重定向的限制”;如果我通过IP地址访问我的站点,wordpress,apache,.htaccess,amazon-ec2,Wordpress,Apache,.htaccess,Amazon Ec2,我将我的站点部署到EC2 aws web服务,如果我通过域(Ex:example.com)访问我的站点,它工作得很好,但是如果我通过IP地址(Ex:54.175.187.xxx)访问我的站点,我会得到下面的错误 这是我的.htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUE
# 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>
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
我的虚拟主机配置如下所示
<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>
服务器名mysite.com
服务器管理员webmaster@localhost
重新启动发动机
RewriteCond%{HTTP_HOST}^example.com
重写规则^/(.*)$https://example.com/$1[L,R=301,E=nocache:1]
DocumentRoot/var/www/html/blog/web
选项索引跟随符号链接多视图
允许超越所有
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
你能帮帮我吗?谢谢。index.php在documentroot目录中吗?相反,一个简单的
FallBackResource/index.php
和DirectoryIndex.php
就可以了,但是请确保虚拟主机指向正确的路径,您的index.php似乎丢失了。如果您有权访问virtualhost配置,请不要使用.htaccess@ezra-s,谢谢您的快速响应。index.php是否在documentroot目录中?相反,一个简单的FallBackResource/index.php
和DirectoryIndex.php
就可以了,但是请确保虚拟主机指向正确的路径,您的index.php似乎丢失了。如果您有权访问virtualhost配置,请不要使用.htaccess.@ezra-s感谢您的快速响应。
<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>