Hello, everyone!
I have a question regarding my .htaccess file. It turns out that I have a site in two versions, common and mobile. In the mobile file folder, there is the .htaccess file that receives the following code:
RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|ipad|iphone|ipod|iemobile|opera\ mobile|palmos|webos|googlebot-mobile) [NC]
RewriteRule ^$ http://www.meusite.com.br/ [L,R=302]
In this way, when trying to access the " link " link through a desktop, for example, it is directed to the url main.
So far so good.
The problem is the reverse. In the root folder of the site, in the .htaccess file I put it like this:
RewriteCond %{HTTP_USER_AGENT} (android|blackberry|ipad|iphone|ipod|iemobile|opera\ mobile|palmos|webos|googlebot-mobile) [NC]
RewriteRule ^$ http://www.meusite.com.br/mobile [L,R=302]
With this, the user when trying to access the main link through a mobile, should be directed to the mobile directory, but it is not working.
Is there an error in this file?
Abcs