2011-06-16 24 views
0

我怎麼會CHANE在地址欄下面的鏈接爲.html?如何改變?P = our_courses&COURSE_ID = 12所以它看起來像HTML文件的.htaccess

我試圖做到這一點使用.htaccess文件

我有我使用過,但不沒有如何將其更改爲我的需要後續的代碼。

RewriteEngine on 
RewriteRule ^([^/\.]+)\.html index.php?act=$1 [L] 

對於如我的一些鏈接,它們像下面

?P = our_courses & COURSE_ID = 12

?P中所列的那些= my_account的&貓= 1 & COURSE_ID = 12

謝謝

回答

0

for?p = my_account & cat = 1 & COURSE_ID = 12

嘗試。

Options +FollowSymLinks 
RewriteEngine on 

RewriteRule -p-(.*)-cat-(.*)-course_id-(.*)\.html index.php?p=$1&cat=$2&course_id=$3 
0

你可以試試這個:

Options +FollowSymLinks 
RewriteEngine On 
RewriteRule ^([^/.]+)/our_courses.php$ index.php?p=our_courses&course_id=$1 [L] 
RewriteRule ^([^/.]+)/(^/.]+)/my_account.php$ index.php?p=my_account&cat=$2course_id=$1 [L] 
+0

不起作用 – Rickstar 2011-06-16 11:28:25

相關問題