我想我的網站看起來是這樣的: http://www.example.com/about代替的web_url /指數[點] PHP頁面=約刪除 「?index.php頁面=文件名」
裏面我的索引[點] PHP中,我像這樣的導航鏈接:
<a href="index[dot]php?page=about">about</a>
etc.
...
$view = $_GET['page'];
switch($view){
case 'about':
include("pages/about.html");
break;
case 'project':
include("pages/project.html");
break;
... and so on
}
/* I have tried edit .htaccess file */
like this:
order allow,deny
allow from all
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/
RewriteRule ^(([^/]+/)*)index\.php$ websiteurl/$1 [R=301,L]
請幫忙!
感謝, 別名
P/S:我有內部的index.php作爲導航鏈接如下: about project – alias 2011-05-19 15:36:46