开发者

how to redirect a link to another link using htaccess?

i ha开发者_如何学编程ve a link like:

www.website.com/index.php?id=123456

and i want to redirect to:

www.website.com/test.php

the problem is that the id can be different each time, could be id=123456 or id=632456

any ideas on how to solve this?

thanks

edit:

what if i want to redirect it to www.website.com/test.php?id=123456 or whatever that id is?


Something like this:

RewriteRule index\.php.* test.php

Or you can be more specific:

RewriteRule index\.php\?id=[0-9]+$ test.php

Or you can even send the id too:

RewriteRule index\.php\?id=([0-9]+)$ test.php?id=$1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜