| | #1 |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
|
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.
| |
| |
| | #2 |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
|
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> 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! | |
| |
| | #3 | |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
|
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.
| ||
| |
| | #4 |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
|
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! | |
| |
| | #5 | |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
|
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.
| ||
| |
| | #6 | |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
|
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! | ||
| |
| | #7 | |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
|
I'm just waiting for his reply Jay. Thanks! I will let you know. | |
| Hooked To Success -Personal development For People Who Wants Success.
| ||
| |
| | #8 |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
|
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! | |
| |
| | #9 | |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
|
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.
| ||
| |
| | #10 |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
| |
| Sorry, I am too busy helping people to think of a cool signature! | |
| |
| | #11 |
| The Cave Man War Room Member Join Date: 2010
Posts: 334
Thanks: 59
Thanked 96 Times in 79 Posts
| |
| Hooked To Success -Personal development For People Who Wants Success.
| |
| |
| | #12 | |
| Mobile+WP = JumpMobi.com War Room Member Join Date: 2009 Location: San Antonio, Tx
Posts: 1,271
Thanks: 301
Thanked 449 Times in 309 Posts
|
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! | ||
| |
|
| Bookmarks |
| Tags |
| joomla, mobile, redirecting, website |
| |