WampServer設(shè)置apache偽靜態(tài)出現(xiàn)404 not found及You don't have permission to access / on this server解決方法分析 原創(chuàng)
本文實例講述了WampServer設(shè)置apache偽靜態(tài)出現(xiàn)404 not found及You don't have permission to access / on this server解決方法。分享給大家供大家參考。具體如下:
出現(xiàn)404 not found 時:
確保LoadModule rewrite_module modules/mod_rewrite.so開啟
然后
Options FollowSymLinks
AllowOverride none #此處把none 改成All
Order allow,deny
deny from all
</Directory>
出現(xiàn):You don't have permission to access / on this server
Options FollowSymLinks
AllowOverride none #此處把none 改成All
Order allow,deny
deny from all #此處把deny改成Allow
</Directory>
確保設(shè)置了默認首頁:
DirectoryIndex index.html index.htm index.php
</IfModule>
有時候在WampServer上設(shè)置Apache偽靜態(tài)還是會出現(xiàn)
You don't have permission to access / on this server
的提示
這時候進一步修改:
Options FollowSymLinks #此處將FollowSymLinks改為All
AllowOverride All
Order allow,deny
deny from Allow
</Directory>
將Options FollowSymLinks改為:Options All
問題即可解決。
附(偽靜態(tài)測試代碼):
新建php頁面index.php:
<?php
if($_GET){
echo $_GET["id"];
}
?>
同級目錄下建立文件.htaccess,寫入偽靜態(tài)規(guī)則如下:
RewriteRule ^t_(.*).html$ index.php?id=$1
URL地址欄寫入:
http://localhost/t_aaa.html
偽靜態(tài)設(shè)置成功則輸出:aaa
希望本文所述對大家的Apache服務(wù)器設(shè)置有所幫助。
- 詳解CentOS7安裝配置Apache HTTP Server
- apache You don''t have permission to access /test.php on this server解決方法
- Apache2.4.x版wampserver本地php服務(wù)器如何讓外網(wǎng)訪問及啟用.htaccess
- Win2003+apache+PHP+SqlServer2008 配置生產(chǎn)環(huán)境
- Ubuntu Server 10.04修改Apache的默認目錄的方法
- Apache中啟用Server Status配置示例
- Moon_LServer Linux下一鍵搭建Apache+PHP+MySQL+Zend+PHPMyAdmin+GD庫的軟件
- Apache實現(xiàn)Web Server負載均衡詳解(不考慮Session版)
- WampServer下安裝多個版本的PHP、mysql、apache圖文教程
- Linux下Apache HTTP Server 2.4.26安裝教程
相關(guān)文章
Mac OSX下使用MAMP安裝配置PHP開發(fā)環(huán)境
本部分描述如何在 Mac 上安裝 MAMP。將通過一個操作安裝 Apache Web 服務(wù)器、MySQL 和phpMyAdmin,需要的朋友可以參考下2017-09-09
Z-Order加速Hudi大規(guī)模數(shù)據(jù)集方案分析
這篇文章主要介紹了通過Z-Order技術(shù)加速的Hudi大規(guī)模數(shù)據(jù)集方案分析,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步早日升職加薪2022-03-03
ubuntu14.04LTS安裝nginx+mariaDB+php7+YAF的方法
這篇文章主要介紹了ubuntu14.04LTS安裝nginx+mariaDB+php7+YAF的方法,詳細講述了ubuntu14.04LTS環(huán)境下nginx+mariaDB+php7+YAF的安裝方法與相關(guān)注意事項,需要的朋友可以參考下2016-05-05
CentOS環(huán)境下單獨安裝apachebench的方法
這篇文章主要介紹了CentOS環(huán)境下單獨安裝apachebench的方法,分析了apachebench的安裝步驟與相關(guān)注意事項,需要的朋友可以參考下2016-10-10
cwrsync server 服務(wù)啟動失敗的解決方法小結(jié)
因為服務(wù)器用cwrsync用來同步數(shù)據(jù),有時候連接不上的時候,到服務(wù)器上查看cwrsync server停止了,啟動時就提示啟動失敗2012-06-06
便宜vps多是哪些技術(shù)架構(gòu)方式(VPS分割架構(gòu)是怎么超售的)
對于vps服務(wù)器租用,一些人們可能比較注重vps服務(wù)器價格,那么,了解和清楚哪一類vps服務(wù)器比較便宜是有必要的,這樣我們就有針對的去選用購買自己需要的便宜vps服務(wù)器2015-09-09

