redirect if url contains specific string using htaccess

后端 未结 3 1317
故里飘歌
故里飘歌 2021-01-12 10:28

I want to redirect to different domain, 83answers.com if url contains forum string.

Like if my url is test.guru99.com/forum/xyxyxzz<

3条回答
  •  借酒劲吻你
    2021-01-12 11:06

    You can add an OR clause between two RewriteCond like this:

    RewriteCond %{QUERY_STRING} forum [OR]
    RewriteCond %{REQUEST_URI} forum
    RewriteRule ^ http://83answers.com/? [L,R=301]
    

提交回复
热议问题