我试图重定向到包含index.php等的/ hc /目录。浏览器显示ERR_TOO_MANY_REDIRECTS错误。请告诉我我在这里做错了什么。Laravel 5.X - 使用IP地址时出现太多重定向错误
这是工作得很好,当我在我的旧主机中使用域名。现在,当我使用IP时,它失败了。
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /hc/
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
RewriteCond %{HTTP_HOST} ^45.117.122.107$ [NC]
RewriteRule ^(.*)$ http://45.117.122.107/$1 [L,R=301]
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php?/$0 [PT,L,QSA]
回退我的变化,如果你不喜欢他们。 –