簡體   English   中英

V 主機問題 - 無法加載網頁 - 繼續加載但沒有結果

[英]V hosts issue - Couldn't load webpage - Keep loading but no result

我正在嘗試使用虛擬主機建立一個本地網站。 我正在使用 Mac big sur 11.6 - Mamp 6.3 /apache。 下面是文件的配置:/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/Users/THE_USER/sites/symfart/public/"
ServerName  symfart.local
</VirtualHost>

這是文件 /etc/hosts 的配置:127.0.0.1 localhost 255.255.255.255 broadcasthost::1 localhost 127.0.0.1 symfart.local

我已經更新了文件 /Applications/MAMP/conf/apache/httpd.conf 並取消注釋了兩行: LoadModule vhost_alias_module modules/mod_vhost_alias.so 和 Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

沒有錯誤 > 頁面保持加載並且沒有結果(就像一個無限循環)謝謝你的幫助

經過研究,我發現我在公用文件夾中丟失了一個 .htaccess 文件。 這是它的內容:

<IfModule mod_rewrite.c>
RewriteEngine On

# Determine the RewriteBase automatically and set it as environment variable.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]

# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]

# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM