這篇文章主要為大家詳細介紹了apache開啟偽靜態的方法,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下。
成都創新互聯云計算的互聯網服務提供商,擁有超過13年的服務器租用、服務器托管雅安、云服務器、網站空間、網站系統開發經驗,已先后獲得國家工業和信息化部頒發的互聯網數據中心業務許可證。專業提供云主機、網站空間、申請域名、VPS主機、云服務器、香港云服務器、免備案服務器等。
apache開啟偽靜態的步驟:
打開apache的配置文件httpd.conf,路徑:wamp\bin\apache\apache2.4.9\conf\httpd.conf
找到
#LoadModule rewrite_module modules/mod_rewrite.so
把前面#去掉。沒有則添加,但必選獨占一行,使apache支持 mod_rewrite 模塊
找到
<Directory "D:/ApacheServer/web"> # # 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 # http://httpd.apache.org/docs/2.2/mod/core.html#options # 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 </Directory>
把 AllowOverride None 換成 AllowOverride All 使apache支持 .htaccess 文件
重啟apache服務器
在要啟用偽靜態的 PHP 項目根目錄下建立 .htaccess 文件
以上就是apache開啟偽靜態的方法的簡略介紹,當然詳細使用上面的不同還得要大家自己使用過才領會。如果想了解更多,歡迎關注創新互聯行業資訊頻道哦!
網頁名稱:apache開啟偽靜態的方法
網頁網址:http://vcdvsql.cn/article42/pejchc.html
成都網站建設公司_創新互聯,為您提供外貿建站、小程序開發、虛擬主機、云服務器、手機網站建設、域名注冊
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯