Loading...

ubuntu 18.04 apache 目錄啟用並開啟.htaccess 覆寫

Temperature: 0 °C

Mark ChangMark Chang
author_tools

.htaccess是在Apache HTTP Server這款服務器架設軟件下的一個對於系統目錄進行各種權限規則設置的一個文件,存在於Linux操作系統中。
比較常見的是定義默認首頁名 稱,404頁面,301轉向,等。

啟用apache 的 mod_rewrite 模組

# sudo a2enmod rewrite

重新啟動apache,重新讀取模組,設定才會生效
# sudo service apache2 restart

使用vi編修apache2.conf
# sudo vi /etc/apache2/apache2.conf

將原先 AllowOverride None 修改為 All

ubuntu 18.04  apache 目錄啟用並開啟.htaccess 覆寫

Options Indexes FollowSymLinks
AllowOverride All
Require all granted

重新啟動apache,重新讀取設定檔,設定才會生效
# sudo service apache2 restart

https://innstory.com/story-ubuntu_1804__apache_目錄啟用並開啟htaccess_覆寫-2281
Linux

Prev
 如何增加WordPress網站的PHP時間限制

Next
想在網頁上預覽PDF可使用的方案 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

RPO(Relative Path Overwrite)相對路徑覆蓋攻擊

RPO(Relative P...

首先,先來用例子說明何謂「相對路徑」何謂「絕對路徑」。 例如你有一個網址為http://www.de...

.htaccess與RewriteEngine一起使用時500內部服務器錯誤

.htaccess與Rewr...

在某些情況下,可能未加載apache中的modrewrite模塊。 這時只需要執行以下指令就可以獲得...

想在網頁上預覽PDF可使用的方案

想在網頁上預覽PDF可使用的...

使用pdfobject.js #設定顯示位置 <div id="pdf"></d...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format