Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

not rewriting customer script header('Location:
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: not rewriting customer script header('Location:

not rewriting customer script header('Location: 13 years ago #26360

Hi, having problems figuring out a problem with joomla rewriting urls created by using redirect of PHP header('Location:

I would reallly like to understand why jomSEF does not capture the URL and convert it to an SEF URL. Any possible configuration for joomSEF to enable it to process the URL would be appeciated greatly. Suggestions of how to rewrite the custom included script or possible ways of a work around using .htaccess are also a bonus, please see details of environment and problem below:

VERSION INFO
JoomSEF version 3.8.2
Related extensions: Virtuemart/CherryPicker
Joomla! 1.5.23 Stable [ senu takaa ama baji ] 04-March-2011 18:00 GMT
Web server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 PHP/5.3.8

CUSTOMIZATION
I have customized the Vituemart Cherry Picker Module to include a
require_once
UK vehicle car reg lookup script.

The included script has the following process steps:

1. Customer submits UK vehicle reg using form
2. Script queries vehicle details from DVLA database
3. Returned query variables used to do a PHP header('Location: URL sames as Virtuemart Cherry Picker
Example header relocate code:
if(!isset($_COOKIE['rm'])){
// Set new url with header
header('Location: index.php?option=com_virtuemart&page=shop.browse&category_id=0&limitstart=0&product_type_id=3&product_type_3_Make_comp=find_in_set&product_type_3_Make='.$make.'&product_type_3_Year_comp=find_in_set&product_type_3_Year='.$v_year.'&product_type_3_Model_comp=find_in_set&product_type_3_Model=&product_type_3_Engine_comp=texteq&product_type_3_Engine=&product_type_3_Fuel_comp=texteq&product_type_3_Fuel=');
 
die();
 


4. Virtuemart Cherry Picker searches Virtuemart types and returns products

THE PROBLEM, ERROR or BUG
joomSEF does not detect and rewrite the URL of the PHP header('Location:....

Regards
Mark
Mark
ID 23447
Joomla Version 1.5.23
JoomSEF 3.9.5
Virtuemart 1.1.7
Virtuemart Extension Version 2.0.34

AND

JoomSEF Version 4.2.9
Virtuemart Cart 2.0.8e
The topic has been locked.

Re: not rewriting customer script header('Location: 13 years ago #26412

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,
In your PHP code you need to use the JRoute::_() function to convert the non-SEF URL to SEF, like this:
$url = JRoute::_('index.php?option=com_virtuemart&page=shop.browse&category_id=0&limitstart=0&product_type_id=3&product_type_3_Make_comp=find_in_set&product_type_3_Make='.$make.'&product_type_3_Year_comp=find_in_set&product_type_3_Year='.$v_year.'&product_type_3_Model_comp=find_in_set&product_type_3_Model=&product_type_3_Engine_comp=texteq&product_type_3_Engine=&product_type_3_Fuel_comp=texteq&product_type_3_Fuel=');
header('Location: ' . $url);
ARTIO Support Team
The topic has been locked.

Re: not rewriting customer script header('Location: 13 years ago #26426

As simple as that LOL, thanks dajo, that's working fine now. Next on the list is .htaccess rewrite all vurtuemart category links to cherrypicker links so my reg cookie will keep the vehicle information even if the customer deciides to browse by category. I've never worked with rewriting variables so this should be fun.

Cheers mark
Mark
ID 23447
Joomla Version 1.5.23
JoomSEF 3.9.5
Virtuemart 1.1.7
Virtuemart Extension Version 2.0.34

AND

JoomSEF Version 4.2.9
Virtuemart Cart 2.0.8e
Last Edit: 13 years ago by markkenyon.
The topic has been locked.
  • Page:
  • 1
User Login Empty