Convert If rewrite rule to modrewrite

0

Please help me to convert below to a modrewrite rule.

<If "%{HTTP_HOST} == 'm-dev.domain.com'">
 Redirect "/subdomain/page-to-load" "http://m-dev.domain.com/subdomain/page-to-load-mobile"
</If>

If wont work on apche 2.2 hence I need to use mod rewrite.

Unnikrishnan

Posted 2017-03-20T06:42:15.350

Reputation: 1 193

Answers

1

RewriteCond %{HTTP_HOST} =m-dev.domain.com
RewriteRule ^/?subdomain/page-to-load$ /subdomain/page-to-load-mobile [L,R=permanent]

julp

Posted 2017-03-20T06:42:15.350

Reputation: 136