安裝了Drupal 8,顯示了下面這行
這功能跟Apache的一個模組有關
要先去安裝此模組再做設定
這跟a2enmod rewrite 有關,不需要另外安裝,只需要下以下指令開啟
重啟apache2,2種指令,挑一種就行
不過我們不只是要開啟這個模組,還要設定Clean URLs
到
重新restart apache2就可以了
參考來源
Clean URLs with Apache 2 on Ubuntu
Ubuntu 如何設定 Drupal 的簡潔網址( Clean URL) ?
Ubuntu 如何安裝和啟用 Apache 的 rewrite 模組 ?
Drupal 8 install warn, Clean Urls Disabled while it is enabled
Your server is capable of using clean URLs, but it is not enabled. Using clean URLs gives an improved user experience and is recommended.
簡單來說,就是系統沒有開啟Clean URLS的功能
去查了一下這功能跟Apache的一個模組有關
要先去安裝此模組再做設定
這跟a2enmod rewrite 有關,不需要另外安裝,只需要下以下指令開啟
sudo a2enmod rewrite
開啟後重啟apache2,2種指令,挑一種就行
sudo service apache2 restart
sudo /etc/init.d/apache2 restart
想知道有沒有開啟的話,到
cd /etc/apache2/mods-enable
如果有
rewrite.load
就是成功了不過我們不只是要開啟這個模組,還要設定Clean URLs
到
/etc/apache2/apache2.conf
找到
<--Directory /var/www/-->
把
AllowOverride None
改成
AllowOverride All
儲存後重新restart apache2就可以了
參考來源
Clean URLs with Apache 2 on Ubuntu
Ubuntu 如何設定 Drupal 的簡潔網址( Clean URL) ?
Ubuntu 如何安裝和啟用 Apache 的 rewrite 模組 ?
Drupal 8 install warn, Clean Urls Disabled while it is enabled
留言
發佈留言