I want to redirect mobile users to the mobile homepage of a site based on WordPress. I am using the following code but facing two issues: 1- Should I redirect with a 301, 302, or 307? 2- Google penalizes for a 1.5-second redirect delay in speed tests. How can I avoid this?
# BEGIN Mobile redirect
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_HOST} siteadi\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ https://www.siteadi/mobil [L,R=302]
# END Mobile redirect
# BEGIN Mobile redirect
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_HOST} siteadi\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
Rewriterule ^(.*)$ https://www.siteadi/mobil [L,R=302]
# END Mobile redirect