2013-03-03 132 views

回答

1

試試這個:

RewriteEngine On 
RewriteRule ^(.+)/(.+)$ main.php?route=$1&id=$2 
+0

@OxJoke工作正常。但是,CSS和圖像文件不會被採摘.. – user2129094 2013-03-04 05:32:36

+0

我在代碼改變是這樣 RewriteEngine敘述在 RewriteBase/pillais 的RewriteCond%{} REQUEST_FILENAME!-f 的RewriteCond%{} REQUEST_FILENAME!-d 的RewriteCond% {REQUEST_URI}!=/favicon.ico RewriteRule ^(。+)/(。+)$ index.php?route = $ 1&id = $ 2 [L,QSA] 當我點擊鏈接從主頁聯繫我們在該頁面css中顯示爲http:// localhost/pillais/page/view /&id = contact-pillais-academy的URL以及它不會選擇的圖像。 當我單擊另一個鏈接課程概述時,同樣來自同一頁面(http:// localhost/pillais/page/view /&id = contact-pillais-academy),url顯示爲 – user2129094 2013-03-04 08:27:48

+0

http:// localhost/pillais/page/view/page/view /&id = courses-overview – user2129094 2013-03-04 08:32:54