Apache開啟偽靜態

2021-09-02 12:47:37 字數 1032 閱讀 9626

apache開啟偽靜態

#loadmodule rewrite_module modules/mod_rewrite.so

把前面#去掉。沒有則新增,但必選獨佔一行,使apache支援 mod_rewrite 模組找到#

# possible values for the options directive are "none", "all",

# or any combination of:

# indexes includes followsymlinks symlinksifownermatch execcgi multiviews

## note that "multiviews" must be named *explicitly* --- "options all"

# doesn't give it to you.

## the options directive is both complicated and important. please see

# # for more information.

#options indexes followsymlinks

## allowoverride controls what directives may be placed in .htaccess files.

# it can be "all", "none", or any combination of the keywords:

# options fileinfo authconfig limit

#allowoverride none

## controls who can get stuff from this server.

#order allow,deny

allow from all

把allowoverride none 換成 allowoverride all 使apache支援 .htaccess 檔案

重啟apache伺服器

在要啟用偽靜態的 php 專案根目錄下建立 .htaccess 檔案

Apache開啟偽靜態

開啟apache的配置檔案httpd.conf 找到 loadmodule rewrite module modules mod rewrite.so 把前面 去掉。沒有則新增,但必選獨佔一行,使apache支援 mod rewrite 模組找到 possible values for the op...

Apache 開啟偽靜態

網上的資料雖多但是不是所有的都是能夠解決自己問題的,乙個偽靜態花掉了我一兩個小時去弄他,反覆的修改配置檔案,真的很坑!網上大致有兩個說法,乙個是在網頁根目錄下找到.htaccess檔案並修改,但是我找了一會兒始終沒有找到這個檔案,可能是我自己的方法不對,所以這個方法我就放棄了。還有一種就是修改 ap...

Apache開啟rewrite實現偽靜態

開啟rewrite的方法非常簡單,開啟apache安裝目錄下的conf httpd.conf檔案 去掉 loadmodule rewrite module modules mod rewrite.so 前面的井號注釋 loadmodule rewrite module modules mod rew...