K
K
Kirill2014-10-17 05:43:23
htaccess
Kirill, 2014-10-17 05:43:23

Should you use a mobile redirect on your site? And how to register it through .htaccess?

Hi all.
I hope I get an answer to this question here.
I want to put a mobile redirect on the site through .htaccess, I write the following code in it

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /


#redirect mobile browsers
RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$
RewriteRule ^(.*)$ http://saite.ru/m/ [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
RewriteRule ^(.*)$ http://saite.ru/m/ [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
RewriteRule ^(.*)$ http://saite.ru/m/ [R=301]
RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
RewriteRule ^(.*)$ http://saite.ru/m/ [R=301]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

But when checking for a redirect on this site , it tells me that there are no redirects. I go to the site from a mobile phone - there is no redirect. Need a redirect to m.saite.ru or saite.ru/m
And the most important question - is it worth using? Or is it better to score? Because I read some articles on blogs on the Internet - they write that supposedly search engines are starting to throw out sites with such a redirect from the search.
Who has dealt with such things please tell me!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2014-10-17
@Lobanov

If this is a website - make adaptive cross-browser layout and forget about redirects.
If this is a mobile WEB application - do not mix site links and application links: they should be different and unique for each page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question