Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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
Regex 301更改结构后重定向到新url_Regex_.htaccess_Redirect - Fatal编程技术网

Regex 301更改结构后重定向到新url

Regex 301更改结构后重定向到新url,regex,.htaccess,redirect,Regex,.htaccess,Redirect,它是一系列页面,旧的URL结构如下: http://www.domain.com/string.com?keyword 新的是 http://www.domain.com/string.com?keyword-and-keyword 这些是一系列的页面,因此在第一个&page=后面的url之后,您的问题就不清楚了,请准确说明您尝试了什么,以及您期望的重定向应该是什么。抱歉,实际url是domain.com/string.html?关键字新的是domain.com/string.html?关键

它是一系列页面,旧的URL结构如下:

http://www.domain.com/string.com?keyword
新的是

http://www.domain.com/string.com?keyword-and-keyword

这些是一系列的页面,因此在第一个
&page=
后面的url

之后,您的问题就不清楚了,请准确说明您尝试了什么,以及您期望的重定向应该是什么。抱歉,实际url是domain.com/string.html?关键字新的是domain.com/string.html?关键字和关键字2所以基本上我们添加了关键字和关键字2这是一系列页面,所以第二个旧的:domain.com/string.html?关键字和页面=2新的是:domain.com/string.html?keyword-and-keyword2&page=2旧url应301重新指定为新url