-1

我想将我的网站网址重定向到新网站

http://www.oldsite.com/user/profile/?type_id=1

http://www.newsite.com/newuser/profile_one

我已经修复了要使用的 URL.htaccess

代码.htaceess如下

编辑代码

Options +FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
#http://www.oldsite.com/user/profile/?type_id=1
RewriteCond %{QUERY_STRING} type_id=1 [NC]
RewriteRule ^user/profile/$ http://www.newsite.com/newuser/profile_one$1? [R=301,L]

这工作正常,但对于type_id 1 to 10它只选择 1的值,type_id 20 to 29并且需要 2 条记录...

所以我很确定它只读取第一个数字

4

1 回答 1

1

我给出的答案是

RewriteCond %{QUERY_STRING} type_id=1$ [NC]

我们必须$在查询字符串结束时添加。

于 2013-02-07T04:14:16.413 回答