欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

WampServer設(shè)置apache偽靜態(tài)出現(xiàn)404 not found及You don't have permission to access / on this server解決方法分析 原創(chuàng)

原創(chuàng)  更新時間:2015年10月16日 15:57:09   原創(chuàng) 投稿:shichen2014  
這篇文章主要介紹了WampServer設(shè)置apache偽靜態(tài)出現(xiàn)404 not found及You don't have permission to access / on this server解決方法,較為詳細(xì)的分析了幾種常見情況,非常具有實(shí)用價值,需要的朋友可以參考下

本文實(shí)例講述了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開啟
然后

復(fù)制代碼 代碼如下:
<Directory />
    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
復(fù)制代碼 代碼如下:
<Directory />
    Options FollowSymLinks
    AllowOverride none  #此處把none 改成All
    Order allow,deny
    deny from all  #此處把deny改成Allow
</Directory>

 
確保設(shè)置了默認(rèn)首頁:
復(fù)制代碼 代碼如下:
<IfModule dir_module>
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
的提示

這時候進(jìn)一步修改:

復(fù)制代碼 代碼如下:
<Directory />
    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ī)則如下:

復(fù)制代碼 代碼如下:
RewriteEngine On
RewriteRule ^t_(.*).html$ index.php?id=$1

URL地址欄寫入:

http://localhost/t_aaa.html

偽靜態(tài)設(shè)置成功則輸出:aaa

希望本文所述對大家的Apache服務(wù)器設(shè)置有所幫助。

相關(guān)文章

最新評論