开发者

Redirect a URL with a query string to a specific subdomain with the same query string

Here's the goal: redirect this: http://exa开发者_运维问答mple.com/someDir/default.aspx?Some=query to: http://sub.example.com/home/default.aspx?Some=query

Is this at all possible in .htaccess? Can I do it in a WordPress environment?

Thanks for your help!

-Jacob


Yes -- RedirectMatch lets you use capture groups:

RedirectMatch 301 /foo/bar.aspx(\?.+)? http://sub.example.com/foo/bar.aspx$1
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜