0

I have a Search Page and I'd like to have an SEF URL but I don't want to have it inserted in the DB. Eg. www.abc.com/facility-search/types/state/city/

www.abc.com/facility-search/school/california/los-angeles/ or www.abc.com/facility-search/school+hospital/california/los-angeles/ where the type is delimited using '+'

There are thousands of combination so I don't want to index them in the db Is there a way to do this without the SH404SEF inserting them to the db?

I want to be able to paste the url to a browser and then just parse anything that comes after facility-search. (i wont have an equivalent url with parameters)

Thanks a lot

Orion
  • 27
  • 1
  • 4

1 Answers1

0

Ofcourse. you could use .htaccess for a QSA Query apending string. So in your given example this would be something like:

RewriteRule ^facility-search/(.*)$ index.php?search=$1 [QSA,L]  

and you can than catch it in your php to perform actions strip them down or anything else so catch it as:

$pathArray = explode('/', $_GET['rt']);

Now you exploded it you can do anything you like with it. The url: www.abc.com/facility-search/school/california/los-angeles/ will give the following output

$pathArray[0]; // returns 'school'
$pathArray[1]; // returns 'california'
$pathArray[2]; // returns 'los-angeles'

I hope you understand the concept.

John In't Hout
  • 304
  • 1
  • 10
  • Thank you so much. I've added the rewrite code to the .htaccess and it worked. I just have an additional question, how can I prevent the url from being inserted in the jos_redirection. I'm not very familiar with joomla and all sorry. – Orion Nov 29 '12 at 16:27