久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php偽靜態(tài)后html不能訪問(wèn)怎么辦

      php偽靜態(tài)后html不能訪問(wèn)的解決辦法:首先判斷文件是否存在;然后設(shè)置存在則不rewirte,不存在且符合規(guī)則才rewrite;最后修改htaccess文件即可。

      php偽靜態(tài)后html不能訪問(wèn)怎么辦

      推薦:《PHP視頻教程》

      具體問(wèn)題:

      PHP偽靜態(tài)后不能訪問(wèn)純html文件

      .htaccess文件

      RewriteEngine on RewriteRule index.html$ index.php RewriteRule art.html$ project.php?file=art RewriteRule music.html$ project.php?file=music RewriteRule dance.html$ project.php?file=dance RewriteRule radio.html$ project.php?file=radio RewriteRule director.html$ project.php?file=director RewriteRule perform.html$ project.php?file=perform RewriteRule flight.html$ project.php?file=flight RewriteRule ([a-zA-Z]+)-([0-9]+).html$ page.php?pageid=$2 RewriteRule ([a-zA-Z]+)-([0-9]+)-([0-9]+).html$ page.php?pageid=$2&info=$3 RewriteRule ([a-zA-Z]+)-([0-9]+)-rules-(.*)-([a-zA-Z]+).html$ page.php?pageid=$2&info=$3&file=$4 RewriteRule ([a-zA-Z]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+).html$ page.php?pageid=$2&menuid=$3&file=$4 RewriteRule ([a-zA-Z]+)-([0-9]+)-([a-zA-Z]+).html$ page.php?pageid=$2&file=$3 RewriteRule ([a-zA-Z]+)-([0-9]+)-([a-zA-Z]+)-list([0-9]+).html$ page.php?pageid=$2&file=$3&page=$4 RewriteRule ([a-zA-Z]+)-([0-9]+)-([0-9]+)-([a-zA-Z]+)-list([0-9]+).html$ page.php?pageid=$2&menuid=$3&file=$4&page=$5 RewriteRule ([a-zA-Z]+)-([0-9]+)-([0-9]+)-(.*)-([a-zA-Z]+).html$ page.php?pageid=$2&menuid=$3&artid=$4&file=$5

      而且我都已經(jīng)把 RewriteRule index.html$ index.php 這句去掉了 但打開(kāi)的時(shí)候 還是反問(wèn)偽靜態(tài)

      我現(xiàn)在要訪問(wèn)網(wǎng)站里的純靜態(tài)HTML文件,同時(shí)又要求PHP的偽靜態(tài)也能訪問(wèn),怎么做?

      解決辦法:

      應(yīng)該先判斷文件是否存在,存在則不rewirte。不存在且符合規(guī)則才rewrite

      例如:文件或目錄不存在則rewrite到index.php,否則直接讀取存在的文件。

      <IfModule rewrite_module> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)