I have a portal with multiple categories like PHP, ASP, Java etc. Each of this category has many other subcats. I will take an example and show you what my problem is. Let's take PHP which has Tutorials as one of the subcats which also has email systems as one of the subcats: "PHP > Tutorials > Email systems" If I navigate to PHP my url looks something like this: "http://www.rdomain.com/PHP,category,1,ID,catlistings" and if I navigate deeper to tutorials I get the following result: "http://www.domain.com/Tutorials,category,23,ID,catlistings" and deeper to email systems: "http://www.domain.com/Email_systems,category,52,ID,catlistings" My PHP rewrite function looks this way: function make_link ($baseUrl, $varArray = NULL) { global $setts; (string)$output = NULL; if ('Y' == 'Y') { while (list ($key, $value) = each ($varArray)) { $value = eregi_replace (',', '', $value); $value = eregi_replace (' ', '-', $value); $value = str_replace ('\\', '', $value); $value = eregi_replace ('/', '', $value); $value = eregi_replace ('&', '', $value); $value = eregi_replace ('#', '', $value); $value = eregi_replace (';', '', $value); $value = eregi_replace ('&', 'and', $value); $value = eregi_replace ('"', '', $value); $output .= $value . ',' . $key . ','; } $output .= $baseUrl; return $output; } $output = $baseUrl . '.php'; if ($varArray) { $output .= '?'; while (list ($key, $value) = each ($varArray)) { $output .= $key . '=' . $value . '&'; } } $output = substr ($output, 0, -1); return $output; } @include_once '../catsarray.php'; if ('Y' == 'Y') { $valsArray = explode (',', $_REQUEST['rewrite_params']); $valsCnt = 0; while ($valsCnt < count ($valsArray)) { $_REQUEST[$valsArray[$valsCnt + 1]] = $valsArray[$valsCnt]; $_GET[$valsArray[$valsCnt + 1]] = $valsArray[$valsCnt]; $_POST[$valsArray[$valsCnt + 1]] = $valsArray[$valsCnt]; $valsCnt += 2; } } PHP: ... and the .htaccess: RewriteEngine On RewriteRule ^(.*),(.*)$ $2.php?rewrite_params=$1&page_url=$2 THE PROBLEM: If I navigate to Email systems I want my url to contain the full path like this: "http://www.domain.com/PHP/Tutorials/Email_systems.html" I want it to finish in ".html", I also want to eliminate those commas with a "/" like in the above example. This should be an easy trick for someone who knows SEO but I suck so badly. Thanks for the help, if any.
sorry i,am not aware of programming.They are few threads on Mod_rewrite or in programming section u get many to help u i think.
What's the original url? Something like something.php?whatever=Email_systems&category=52&ID=catlistings
What's the original URL with Email_systems,category,52,ID,catlistings Something like something.php?whatever=Email_systems&category=52&ID=catlistings catlistings.php?ID=1 only covers the ID part.
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)/([^.]+)\.html$ $1,category,$2,ID,catlistings [L] http://www.domain.com/Email_systems,category,52,ID,catlistings to http://www.domain.com/Email_systems/52.html is the only thing you can do *IF* it can work. Odds are, it won't work since you have no something.php?whatever=Email_systems&category=52&ID=catlistings info.
it has to be something that invloves some coding as well nut just some rewrite rules. A function or something. I can't modify it all from .htaccess.