Jump to content


Help with PHP directing incorrectly

  • Please log in to reply
3 replies to this topic

#1 Uniqbuy



  • Members
  • Pip
  • 3 posts

Posted 03 February 2013 - 06:03 AM

I am sure this is fairly simple but unfortunately my limited coding ability is failing me and hope someone on here can help.

I am running Joomla 1.5, Virtuemart 1.1.9 and the component concerned is JD Testimonials. SEF is turned on.

This is the code that I need to fix:

$uri = $router->build('index.php?option=com_jdtestimonials&Itemid='.$this->Itemid.'&order_id='.$order_id);
$url = JURI::root().str_replace('/administrator/', '', $uri->toString());
$link = '<a href="'.$url.'">'.$url.'</a>';

This is the output it is giving:

What I need is:

Alternatively, if someone could comment the code with what each line is doing, I can have a go at correcting it. I am thinking maybe this might do something but unfortunately, it is very difficult to test:
$url = JURI::root().str_replace('/electronics/administrator/', '', $uri->toString());

I have included the full .php file if it helps.Attached File  sendreminder.class.php   6.53KB   1 downloads

#2 requinix


    Nosey Moderator

  • Moderators
  • 6,651 posts
  • LocationWA

Posted 03 February 2013 - 06:11 AM

Those two URLs are the same.

#3 Uniqbuy



  • Members
  • Pip
  • 3 posts

Posted 03 February 2013 - 06:28 AM

Those two URLs are the same.

They are not, they just get shortened when put into this forum

This is what I am currently getting:

This is what I need:

I have figured out the problem is SEF but I do not want to turn SEF off. How could I stop rewrite for the com_jdtestimonials folder in .htaccess - the full address is uniqbuy.com/electronics/administrator/components/com_jdtestimonials

Thanks in advance.

#4 Uniqbuy



  • Members
  • Pip
  • 3 posts

Posted 03 February 2013 - 01:31 PM

More info.

I have added the following entry to .htaccess but I am not sure if this will work:
RewriteRule ^(com_jdtestimonials) - [L]

Can anybody tell me if this should work?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime