• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Trying to redirect mobile users to dedicated mobile site

Guest
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Hi... I desperately need some help!  I am new to BC, but have read through documentation and tried the chat line twice.  I am trying to redirect mobile phone users to a dedicated mobile site.  I've created and uploaded the mobile website and added the following recommended script -

<script type="text/javascript">          

if ('{system_visitorDeviceClass}' == 'phone') {

        window.location = 'http://www.seerestaurant.com.au/mobile.seerestaurant/';

           }       

</script>

between the head tags.  Of course the existing script is still there underneath that -

-->

</script> <script type="text/javascript"> <!-- window.location = "http://www.seerestaurant.com.au/restaurant/see-restaurant-mooloolaba-index.htm" //--> </script>

But the redirect is not working?  Can anyone help me isolate the problem and get this working?

Many thanks in advance

TOPICS
Newbie Corner

Views

1.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

I checked out the site but didn't see the redirect code. Did you take it out? Can you add it to a page, so I can check it for you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Hi Karim, the redirect script is in the page Home.htm - I just checked through the BC admin and it is still showing to me?  Should it be somewhere else?  Greatly appreciate you looking at it for me 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

OK, when I go to:

http://www.seerestaurant.com.au/Home.htm

The redirect works just fine. I tested on my iPhone and it properly redirected me to the mobile site (http://www.seerestaurant.com.au/mobile.seerestaurant/).

I think the problem is that Home.htm is not set as your start page. So when users to go http://www.seerestaurant.com.au/ the page that is set as your start page is http://www.seerestaurant.com.au/Restaurant/see-restaurant-mooloolaba-index.htm which does not have the redirect script in it.

Let me know if that doesn't make sense.

Karim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Ah ha... that does indeed make sense Karim - thank you!  Will see if I can locate the correct page and put the redirect there!  Fingers crossed and as I know you are right on this already...many,many thanks 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

You're very welcome! Let me know if you run into any other problems with this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Brilliant!  I am up and running!  Thanks so much Karim. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 13, 2012 Jun 13, 2012

Copy link to clipboard

Copied

Looks great! Nice job

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 04, 2013 Jul 04, 2013

Copy link to clipboard

Copied

There is a page not found error coming up on your site! Your Mobile Device Detection Script is working To the Extent That it Detects Mobile Devices! You keep Detecting mine! And popping up! Hope this helps!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2013 Jul 09, 2013

Copy link to clipboard

Copied

Mobile sites are terrible. I won't list all the reasons why, but it comes down to content duplication on search engines, your site being completely downranked on search engines in Google's recent update and to be honest the site won't work optimally between devices (tablets vs smartphones).

Not to mention, if somebody clicks your mobile site on Google on a desktop, they will see the mobile version, which will be horrible for the user.

There's many more reasons why, what I would really suggest is using responsive design, perhaps based on the Bootstrap CSS framework.

However, looking at your site there seems to be quite a few things that could be better structrually, so perhaps it's worth researching into how websites should be structured first of all. For example, your main domain http://www.seerestaurant.com.au shouldn't be redirecting to http://www.seerestaurant.com.au/Restaurant/see-restaurant-mooloolaba-index.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 09, 2013 Jul 09, 2013

Copy link to clipboard

Copied

Yea-- It looks like they are using 301 redirects to redirect users from the homepage to /Restaurant/see-restaurant-mooloolaba-index.htm when you should remove that 301 redirect and goto BC Admin > Site Settings > Site Domains and edit your main domain names by clicking the "Edit" link and then setting the homepage to that page at /Restaurant/see-restaurant-mooloolaba-index.htm in there so you don't have an ugly URL for your homepage and avoid that extra network connection that's made during the redirect.

Also, on a graphic front- I would suggest NOT using so many .png files for images.  Unless you explicitly need transparency in the image or the image is just a few colors (like line art) you should be using .jpg files with some compression added (about 60% quality/compression is good) which will keep your site size down.  You should definitely not use .png files for things like photographs (like your slider images) which have lots of colors and gradations in the image-- it will make for a huge PNG file size.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 09, 2013 Jul 09, 2013

Copy link to clipboard

Copied

LATEST

For instance-- your homepage totals in at 2.0 megabytes including html, scripts, css and images.  Your 4 slideshow images total 1.28 megabytes, representing 64% of your total page load. Yikes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines