Jump to content

Help with PHP directing incorrectly


Uniqbuy

Recommended Posts

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:

http://www.uniqbuy.com/electronics//electronicstestimonials.html?order_id=109

 

What I need is:

http://www.uniqbuy.com/electronics/testimonials.html?order_id=109

 

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.sendreminder.class.php

Link to comment
Share on other sites

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:

uniqbuy.com/electronics//electronicstestimonials.html?order_id=109

 

This is what I need:

uniqbuy.com/electronics/testimonials.html?order_id=109

 

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.