Vivvo CMS Support Forum Home | Free Trial | Online Demo | Docs and Manuals | Order Now   

Go Back   Vivvo CMS Support Forums > Vivvo 4 > Troubleshooting

Troubleshooting Problems, need help? Have a tip or advice? Post it here.

Reply
 
Thread Tools Display Modes
Old 06-03-2012, 03:29 PM   #1
riker1981
Vivvo User
 
Join Date: Jan 2008
Posts: 84
Rep Power: 6
riker1981 is on a distinguished road
Default Mobile Auto Detect & Redirect Via Search

Hi Everyone,

My mobile redirect only works when people visit the homepage with their mobile device. Is there a way to redirect when they come through a search engine to an article page?

Quote:
RewriteCond %{QUERY_STRING} !^version=web$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(spider|crawl|slurp|bot) [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Linux.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*Win.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Windows\s+CE.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*OS\s+(X|9).*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*iP(hone|od)(;|\s).*$
RewriteCond %{HTTP_USER_AGENT} !^.*Solaris.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*BSD.*$
RewriteRule ^/?$ http://www.yoursite.com/mobile/$1 [R=302,L]
riker1981 is offline   Reply With Quote
Old 06-03-2012, 07:59 PM   #2
theodore
Vivvo Veteran
 
theodore's Avatar
 
Join Date: Nov 2006
Location: Greece
Posts: 587
Rep Power: 7
theodore is on a distinguished road
Default

Create a html_header template only for articles (for example call it html_header_article.tpl and put it in your article/default.tp instead of html_header.tpl)

In html_header_article.tpl before </head> add the following code:

Code:
<script language="JavaScript" type="text/javascript">
if (navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
navigator.userAgent.match(/ZuneWP7/i)
) {
window.location = 'http://yoursite.com/mobile/<vte:value select="{article.get_href}" />';
}
</script>
Ofcource you can add or remove userAgents.

Also replace yousite.com with your actual site url

I hope to help you
__________________
Green Interactive Media | Wed design, Wed development
theodore is offline   Reply With Quote
Old 06-04-2012, 05:56 PM   #3
riker1981
Vivvo User
 
Join Date: Jan 2008
Posts: 84
Rep Power: 6
riker1981 is on a distinguished road
Default

Thanks theodore
riker1981 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Order now:

Order your copy of Vivvo now and get:
bullet Six months free upgrades
bullet Free support
bullet Full source code
bullet Immediate download
bullet Starting at only $295.00
Order now

Support HelpDesk:

You can submit a trouble ticket in the support area at any time, using your client area email and password.

Vivvo CMS Resource Center:

The Vivvo CMS Resource Center is your window to a variety of resources that showcase Vivvo's features and technologies. So whether you're brand new to Vivvo or a seasoned user, you can find the information you need right here!

Latest Additions:

Contact us:

Business hours
Mon-Fri 9:00AM - 6:00PM GMT+1
(Europe)
Telephone Sales
381 11 311-50-20
Email inquiries
sales@vivvo.net
(Sales inquiries)
support@vivvo.net
(Support inquiries)

All times are GMT +1. The time now is 03:13 AM.
Contact Us - Vivvo Home - Archive - Privacy Statement - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.