我已經重寫URL在我的網站的.htaccesshtaccess的URL重寫URL multple
的index.php
$op = $_GET['op'];
switch ($op) {
case "src":
include("src.php");
break;
case "dts":
include ("dts.php");
break;
default:
include("home.php");
break;
}
鏈接問題重寫
index.php?op=src
index.php?op=dts&idric=20&sp=2
的.htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteRule \.(css|jpe?g|gif|png|js|ico)$ - [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/$ index.php?op=$1 [L,QSA]
RewriteRule ^(.*)/idric/(.*)/sp/(.*)/$ index.php?op=$1&idric=$2&sp=$3 [L,QSA]
如果我寫第一個lin k www.mysite.com/src/它顯示正確的頁面(src.php), 但如果我寫第二個網址www.mysite.com/dts/idric/20/sp/2/它顯示默認頁面( home.php)。
有人能告訴我如何解決? 謝謝
你有這樣的事情在你的代碼'$ OP = $ _GET [ '運'];'? –