Redirect to a new domain using apache vhost configuration

前端 未结 1 1709
长发绾君心
长发绾君心 2021-01-28 01:34

I have an apache vhost configurations as below. I want all my requests from

somedomain.com/loadproduct?product=dell-inspiron-15

to be redirect

相关标签:
1条回答
  • 2021-01-28 01:52

    You can use (instead of RewriteRule ??):

    RewriteCond %{QUERY_STRING} (?:^|&)product=([^&]+) [NC]
    RewriteRule ^/?loadproduct$ http://someotherdomain.com/%1? [R=301,L,NC]
    
    0 讨论(0)
提交回复
热议问题