我試圖重定向到包含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]
回退我的變化,如果你不喜歡他們。 –