Welcome, Guest
Username Password: Remember me

Mobile version redirects non-sef url to index.php
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Mobile version redirects non-sef url to index.php

Mobile version redirects non-sef url to index.php 11 years, 6 months ago #14759

Hello!

I have an auto tweet plugin, which compiles link to article in non-sef format.

If i click on that link while i am on mobile, it redirects me to mobile version of site but on index.php not to specific article.

Why MobileJoomla does not accepts non-sef urls?

Thanks!


*** EDIT ***

In fact, it works with non-sef URL if its mobile non-sef link, but if the mobile user clicks on non-sef link that is for full version of website, it redirects to mobile version first (subdomain), cut other stuff of link, and puts only index.php.
Last Edit: 11 years, 6 months ago by vbarlakoski.

Re: Mobile version redirects non-sef url to index.php 10 years, 7 months ago #17220

  • Tomshaski
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Hi vbarlakoski . There are a lot of problems like this on Joomla , but I'm sure it doesn't hurt you website SEO .

Re: Mobile version redirects non-sef url to index.php 10 years, 7 months ago #17222

Well, if its not working as it should, it not hurts but it doesn't helps either

 
<?php
if(JFactory::getConfig()->getValue('config.sef')==1) {
  $app =& JFactory::getApplication();
  $uri = strtolower(substr(str_replace(JURI::base(),"",JURI::getInstance()->tostring()),0,21));
  if($uri=="index.php?option=com_")
  $app->redirect(JRoute::_(str_replace(JURI::base(),"",JURI::getInstance()->tostring())));
}
?>
 


Insert this on the top of template's index.php and its gonna be ok. I forgot to update this post after i found solution.

Re: Mobile version redirects non-sef url to index.php 10 years, 5 months ago #17454

  • congluxi
  • OFFLINE
  • Fresh Boarder
  • friv
  • Posts: 1
  • Karma: 0
Good post. Thank vbarlakoski. I need it
  • Page:
  • 1
Time to create page: 0.11 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.