Php htaccess-通过修改一个参数更改URL
我的URL如下所示:Php htaccess-通过修改一个参数更改URL,php,.htaccess,Php,.htaccess,我的URL如下所示: page.php?id=1&lan=en 我想通过htaccess将其更改为page-1.html?lan=en。 请注意,我必须同时获得id和lan两个参数的值。 提前感谢。您可以使用下面的代码。我没有试过,但它应该有用 Options +FollowSymlinks RewriteEngine On RewriteRule ^page-(\d*).html$ page.php?id=$1 [L,QSA]
page.php?id=1&lan=en
我想通过htaccess将其更改为page-1.html?lan=en
。请注意,我必须同时获得
id
和lan
两个参数的值。提前感谢。您可以使用下面的代码。我没有试过,但它应该有用
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^page-(\d*).html$ page.php?id=$1 [L,QSA]