如何改变?p=our_courses&;course_id=12所以它看起来像html文件.htaccess


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

如何将url栏中的以下链接更改为.html?

我正在尝试使用.htaccess文件来完成此操作

我有我以前使用的以下代码,但不知道如何根据我的需要进行更改。

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

例如,我的一些链接与下面列出的链接类似

p=our_courses&课程id=12

p=我的帐户&cat=1&课程id=12

谢谢你,

用于?p=我的帐户&cat=1&课程id=12

试试这个。

Options +FollowSymLinks
RewriteEngine on
RewriteRule -p-(.*)-cat-(.*)-course_id-(.*)'.html index.php?p=$1&cat=$2&course_id=$3

你可以试试这个:

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]