Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache htaccess中URL查询字符串重写_Apache_.htaccess_Url_Query String_Rewrite - Fatal编程技术网

Apache htaccess中URL查询字符串重写

Apache htaccess中URL查询字符串重写,apache,.htaccess,url,query-string,rewrite,Apache,.htaccess,Url,Query String,Rewrite,我正在尝试在.htaccess文件中编写重写规则,但不确定如何使其工作。我要转换此URL: http://www.example.com/userskill/?lvl=100k 到 底层页面最终将是http://www.example.com/home.html?lvl=100k。如何在.htaccess文件中添加重写规则来执行此操作?在htaccess顶部,首先打开重写引擎 RewriteEngine On 之后,您可以添加重写规则。这将类似于: RewriteRule ^userskil

我正在尝试在
.htaccess
文件中编写重写规则,但不确定如何使其工作。我要转换此URL:

http://www.example.com/userskill/?lvl=100k


底层页面最终将是
http://www.example.com/home.html?lvl=100k
。如何在.htaccess文件中添加重写规则来执行此操作?

在htaccess顶部,首先打开重写引擎

RewriteEngine On
之后,您可以添加重写规则。这将类似于:

RewriteRule ^userskill/$ index.php [QSA,L]
QSA部件从url复制查询字符串

有关更多信息,请参阅


在htaccess顶部,首先打开重写引擎

RewriteEngine On
之后,您可以添加重写规则。这将类似于:

RewriteRule ^userskill/$ index.php [QSA,L]
QSA部件从url复制查询字符串

有关更多信息,请参阅