Answer the question
In order to leave comments, you need to log in
How to setup .htaccess file to redirect user from site.com to site.com/mobile?
Apache server. I write the following in the .htaccess configuration file:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} data taken from detectmobilebrowsers.com [NC,OR]
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{REQUEST_URI} !mobile/
RewriteRule ^(.*)$ mobile/$1 [L, R=302]
This results in the error "The server encountered an internal error or misconfiguration and was unable to complete your request".
I tried many different options with a slightly different syntax that I managed to find on the net (I myself am a complete layman) - all in vain. Where is the mistake? Help!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question