我在 apache 服務器上有一個前端應用程式。當我轉到 BASE URL 時,它很好,但是如果轉到 (Base URL)/example 并重繪 此顯示下一條訊息:
Not Found 在此服務器上找不到請求的 URL /example。
在我的服務器 linux (Centos 7) 上的 /var/www/html 上有包含下一個內容的“.htaccess”檔案:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
Somehelp 如何解決這個問題?謝謝 !
uj5u.com熱心網友回復:
我有下一個包裝器
<Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
看起來.htaccess您擁有該.htaccess檔案的特定目錄沒有啟用覆寫。
它應該AllowOverride All在<Directory "/var/www/html">容器中。
然后重新啟動 Apache 以使更改生效。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/346787.html
