|
From: Mitchell S. <ms...@fe...> - 2002-10-10 02:49:21
|
Here's what I've done on my test site to make it search engine friendly: http://shop.sheean.com/xshop/main/shop/browse/category_id=3D93317ae14e362= c9c2f0445a134ee5ced Steps to switching from "?page=3Dshop.browse&" to = "/main/shop/browse/..." 1) in your xshop webroot edit or create a .htaccess file with the = following <Files main> ForceType application/x-httpd-php </Files> This tells apache to parse anything called in a url as main as if it = were a .php file with a .php extension.=20 2) Link or copy your main file to main in your xshop folder=20 # ln -s index.php main Now when you call http://www.domain.com/main/ it will play the index.php = file. Now to step 3 3) Enter some url parsing into your main script to separate parameters = from between the incoming forward slashes that you will now use for = urls.=20 // get variables from the page uri $url_array=3Dexplode("/",$REQUEST_URI); //BREAK UP THE URL PATH USING = '/' as delimiter $main =3D $url_array[1]; $page =3D $url_array[2] . "/" . $url_array[3]; The first line breaks up the incoming url with a slash as delimiter = putting each element into array. We call domain.com/main/ in the url now = so $main will be the first in the array. Not being used but it's there = for illustration. We then take element 2 and 3 and put them back = together with a slash in the middle setting that to the $page variable = the way xshop likes it.=20 I don't know if this will work with the whole site bit it may be worth = exploring.=20 http://shop.sheean.com/xshop/main/shop/browse/category_id=3D93317ae14e362= c9c2f0445a134ee5ced The above will set $page =3D shop/browse other variables come thru so = far. ~mds |