Answer the question
In order to leave comments, you need to log in
How to create a redirect to the mobile version of the site, including how to set it up for SEO?
Good morning dear gurus . The question in the title is not complete because there is not enough space. Questions - 2 .
1. If we create a site with a separate domain, for example, like habr https://habrahabr.ru/ and https://m.habrahabr.ru/ , the question arises: How to create a redirect so that it remains possible to walk between domains? ( there is a thought in my head about cookies that are destroyed after the current session or even disabled - but to be honest I'm not sure if this is right, too clumsy way )
2. How to deal with SEO? (After all, in the case of Drupal, it can be both multi-site and simply configured configs or the use of modules like Domain access . But everyone has a problem with DUPLICATION OF CONTENT . )
Thank you very much in advance ..
Answer the question
In order to leave comments, you need to log in
Use .htaccess for your site.
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^ http://m.habrahabr.ru%{REQUEST_URI} [R,L]
<script type="text/javascript">
<!--
if (screen.width <= 800) {
window.location = "http://m.habrahabr.ru";
}
//-->
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question