Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 2nd May 2012, 11:56 PM   #1
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Hi Warriors, I'm really having a problem redirecting clients Joomla website to mobile website that I've done. The .htaccess that I used to install in wordpress website doesn't work in Joomla.

I already made a subdomain of the website which is m.yourwebsite.com but the subdomain doesn't work either. I've researched online and then test some script that you put up in the index.php of the Joomla website but it doesn't work.

I don't really know about Joomla the code for me is complicated. I then messed up the clients website but fortunately he has some back up, right now I can't still figure it out maybe you can help me on this.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 12:37 AM   #2
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Hi jagSeo

The htaccess file for Wordpress isn't compatible with joomla especially if you have search engine friendly urls enabled - that's possibly what killed the site

one way you could do it is edit the template, go to template manager and then edit HTML - the template needs to be writable before you do this if it's not let me know and I can walk you through he steps if your not sure how too...

From the template manage go to edit your template HTML

When you click the edit button you should see all HTML for the template all you need to do is add the following directly before </head> tag

Code:
<script type="text/javascript">
if (screen.width < 1024 || navigator.userAgent.toLowerCase().indexOf('android')!=-1)
(window.location.replace("http://www.yourdomainhere.com"));
</script>
Replace the yourdomain.com with where you want to redirect mobile visitors to

It's just a simple redirect script based on screen size detect and redirect - its not perfect by any means but at least will get you started....

If your not comfortable editing the template you can always put the code in a module position by creating a custom module but just make sure you turn you wysiwyg editor off and don't forget to enable the module

Hope that helps

Jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 3rd May 2012, 06:00 AM   #3
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

Hi jagSeo

The htaccess file for Wordpress isn't compatible with joomla especially if you have search engine friendly urls enabled - that's possibly what killed the site

one way you could do it is edit the template, go to template manager and then edit HTML - the template needs to be writable before you do this if it's not let me know and I can walk you through he steps if your not sure how too...

From the template manage go to edit your template HTML

When you click the edit button you should see all HTML for the template all you need to do is add the following directly before </head> tag

Code:
<script type="text/javascript">
if (screen.width < 1024 || navigator.userAgent.toLowerCase().indexOf('android')!=-1)
(window.location.replace("http://www.yourdomainhere.com"));
</script>
Replace the yourdomain.com with where you want to redirect mobile visitors to

It's just a simple redirect script based on screen size detect and redirect - its not perfect by any means but at least will get you started....

If your not comfortable editing the template you can always put the code in a module position by creating a custom module but just make sure you turn you wysiwyg editor off and don't forget to enable the module

Hope that helps

Jay

There is no really <head></head> tag in his template I think he is using Yoo Flux joomla template and I can't find his <head> tag in his index.php template I think there a header text in there and I've tried to put a script on there but it keeps on showing error.

And when I tried to insert the script in the layout folder template.php the website messed up. I don't know where is the template manager. I have his control panel. Joomla is complicated.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 07:25 AM   #4
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

for me personally i dont think joomla is actually that complicated - just need to take a quick crash course.... its more its terminology and where things are located that i find most people have issues with it... the default data it enters is BS and confusing but you dont need to install that really... fact if you get the chance for someone to show you how it works you will be very surprised at how powerful it can be....

the file that needs changing will be /templates/yoo_flux/index.php not sure where you are finding template.php but you dont want to be changing that...

if you want to pm the details i can put in the script for you its literally just a 2second job - ill just add a module that way you dont need to hack any code or anything...

just as an fyi you should always back up a site before you do anything to it!

xcloner is very good for backing up joomla sites...

cheers

jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 3rd May 2012, 07:39 AM   #5
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

for me personally i dont think joomla is actually that complicated - just need to take a quick crash course.... its more its terminology and where things are located that i find most people have issues with it... the default data it enters is BS and confusing but you dont need to install that really... fact if you get the chance for someone to show you how it works you will be very surprised at how powerful it can be....

the file that needs changing will be /templates/yoo_flux/index.php not sure where you are finding template.php but you dont want to be changing that...

if you want to pm the details i can put in the script for you its literally just a 2second job - ill just add a module that way you dont need to hack any code or anything...





just as an fyi you should always back up a site before you do anything to it!

xcloner is very good for backing up joomla sites...

cheers

jay



I've just PM you Jay.I hope you can help me and sort out the redirection.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 08:18 AM   #6
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by JagSEO View Post

I've just PM you Jay.I hope you can help me and sort out the redirection.
got it can you send me login info for joomla administrator panel - am not gonna mess around with the code i will just add it in as a module

i had quick look at the template files and its not a regular template... typically you would just edit the index.php for the template but it looks like its using its own framework

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 3rd May 2012, 08:28 AM   #7
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

got it can you send me login info for joomla administrator panel - am not gonna mess around with the code i will just add it in as a module

i had quick look at the template files and its not a regular template... typically you would just edit the index.php for the template but it looks like its using its own framework

I'm just waiting for his reply Jay. Thanks! I will let you know.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 08:39 AM   #8
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by JagSEO View Post

I'm just waiting for his reply Jay. Thanks! I will let you know.
you where right Jag was that template.php file you needed to change it was located in /template/yoo_flux/layouts normally you would just need to modify the /template/template_folder/index.php

i just added the script to that file and its working fine now... am not sure your m. subdomain is set up correctly but i did find where your mobile files where located and redirected it to those files...

its actually that template that makes Joomla confusing! lol i promise you its not normally that difficult, i dont know why some of these template designers make modifying there layouts so over complicated....

either way it should all be working... like i said that script is just a basic mobile redirection one and should get you started at least...

will be converting our current wordpress one over to joomla in the not too distant future - if you need to disable you will need to remove from that template.php

feel free to PM though you got any other questions

cheers

jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 3rd May 2012, 09:19 AM   #9
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

you where right Jag was that template.php file you needed to change it was located in /template/yoo_flux/layouts normally you would just need to modify the /template/template_folder/index.php

i just added the script to that file and its working fine now... am not sure your m. subdomain is set up correctly but i did find where your mobile files where located and redirected it to those files...

its actually that template that makes Joomla confusing! lol i promise you its not normally that difficult, i dont know why some of these template designers make modifying there layouts so over complicated....

either way it should all be working... like i said that script is just a basic mobile redirection one and should get you started at least...

will be converting our current wordpress one over to joomla in the not too distant future - if you need to disable you will need to remove from that template.php

feel free to PM though you got any other questions

cheers

jay
It is now working great Jay Thanks for the help.

That template have some complications. Thank you so much, my client will now be happy.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 09:26 AM   #10
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by JagSEO View Post

It is now working great Jay Thanks for the help.

That template have some complications. Thank you so much, my client will now be happy.
no problem - things will be a lot easier once we convert our plugin over to joomla

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 3rd May 2012, 09:32 AM   #11
The Cave Man
War Room Member
 
JagSEO's Avatar
 
Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

no problem - things will be a lot easier once we convert our plugin over to joomla

Yes Jay please do it because it is much harder to redirect joomla website to mobile website.

Wordpress is much easier with the .htaccess thing.

Hooked To Success -Personal development For People Who Wants Success.
JagSEO is offline  
Unread 3rd May 2012, 10:06 AM   #12
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Joomla Website Redirecting To Mobile Website
Share on: 
fb share twitter share gplus share more share

Originally Posted by JagSEO View Post

Yes Jay please do it because it is much harder to redirect joomla website to mobile website.

Wordpress is much easier with the .htaccess thing.
what a lot of people dont realize is that you can also customize the htaccess file to enable people to go back to the main site after they have been redirected too... it needs some custom work to your wordpress theme but it is doable....

i still prefer php user agent detection but there are sometimes when you may need to just use the htaccess approach.... i know a fellow warrior who was in that dilemma not so long ago

we are super busy finalizing our wordpress mobile theme/suite/framework what ever you want to call it lol but as soon as we are done with that we will be expanding our redirection solutions since we have so many ways of doing it now and for so many different platforms and configurations

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Closed Thread


Bookmarks

Tags
joomla, mobile, redirecting, website


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:34 PM.