开发者

How to change ?p=our_courses&course_id=12 So it looks like html file .htaccess

How would i chane the following link in the url bar to .html?

I am trying to do this using .htaccess file

i have the follow code that i was using before but dont no how to change it to my needs.

 RewriteEng开发者_JS百科ine on
 RewriteRule ^([^/\.]+)\.html index.php?act=$1 [L]

for e.g some of my links are like the ones listed below

?p=our_courses&course_id=12

?p=my_account&cat=1&course_id=12

Thank you,


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

try this.

Options +FollowSymLinks
RewriteEngine on

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


You can try this:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜