Redirecting to mobile site without disrupting existing rules - Joomla! Forum - community, help and support
hi
i have joomla site setup using htaccess file canonical redirects e.g. non www gets redirected www version , remove index.php. have setup mobile site using jquery mobile in subdomain.
what want redirect mobile traffic subdomain while keeping canonical redirects when browsing non mobile site , mobile users must able view full site if choose via link mobile version.
make sense?
my current htacess rules:
i have commented out mobile redirect now. how edit above?
i have joomla site setup using htaccess file canonical redirects e.g. non www gets redirected www version , remove index.php. have setup mobile site using jquery mobile in subdomain.
what want redirect mobile traffic subdomain while keeping canonical redirects when browsing non mobile site , mobile users must able view full site if choose via link mobile version.
make sense?
my current htacess rules:
code: select all
## begin - custom redirects
#
# if need redirect pages, or set canonical non-www to
# www redirect (or vice versa), place code here. ensure those
# redirects use correct rewriterule syntax , [r=301,l] flags.
# mobile site redirection
#rewritecond %{http_referer} !^http://(.*).backuptoweb.co.uk/.*$ [nc]
#rewritecond %{http_user_agent} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [nc]
#rewriterule ^(.*)$ http://mobile.backuptoweb.co.uk/$1 [r=302]
# index.php /
rewritecond %{the_request} ^[a-z]{3,9}\ /.*index\.php\ http/
rewriterule ^(.*)index\.php$ /$1 [r=301,l]
rewritecond %{http_host} ^backuptoweb\.co\.uk [nc]
rewriterule ^(.*)$ http://www.backuptoweb.co.uk/$1 [r=301]
#
## end - custom redirects
i have commented out mobile redirect now. how edit above?
what think of logic , order?
rewrite index.php / (definitely don't use [l] flag)
check if mobile visitor , coming mobile site. if yes use rewrite [l] , send http://www.backuptoweb.co.uk/something
check if mobile visitor (and not coming mobile site. if yes use rewrite [l] , send http://www.backuptoweb.co.uk/something
rewrite no-www http://www.backuptoweb.co.uk/something [r=301,l]
some of flags need work.
rewrite index.php / (definitely don't use [l] flag)
check if mobile visitor , coming mobile site. if yes use rewrite [l] , send http://www.backuptoweb.co.uk/something
check if mobile visitor (and not coming mobile site. if yes use rewrite [l] , send http://www.backuptoweb.co.uk/something
rewrite no-www http://www.backuptoweb.co.uk/something [r=301,l]
some of flags need work.
Comments
Post a Comment