|
|||
|
Hallo,
f?r alle, bei denen die Suma-freundlichen URL nicht serverseitig funktionieren, habe ich eine L?sung ?ber .htaccess ----------- RewriteEngine On Options +FollowSymlinks RewriteRule ^(.*).php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ /euershop/$1.php?$2=$3&$4=$5&$6=$7&$8=$9&$10=$11 [L] RewriteRule ^(.*).php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ /euershop/$1.php?$2=$3&$4=$5&$6=$7&$8=$9 [L] RewriteRule ^(.*).php/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)$ /euershop/$1.php?$2=$3&$4=$5&$6=$7 [L] RewriteRule ^(.*).php/(.*)/(.*)/(.*)/(.*)$ /euershop/$1.php?$2=$3&$4=$5 [L] RewriteRule ^(.*).php/(.*)/(.*)$ /euershop/$1.php?$2=$3 [L] ----------- Der Code muss in die .htaccess (im Verzeichnis, in dem die index.php ist) eingef?gt werden. Danach k?nnt Ihr die "Suchmaschinenfreundliche URL" einschalten. Diese L?sung funktioniert bei bis zu 5 Parametern und ist noch erweiterbar. Tipp zum Testen: Vor dem Aktiviern der "Sumafreundlichen URLs" k?nnt Ihr das ganze h?ndisch testen. z.B.: http://www.euredomain.tdl/euershop/shop_co...tent.php/coID/3 viel Spa? MediaDialog |
|
|||
|
Hi stp69,
es geht um die Webserver-Unterverzeichnisse und _nicht_ um die Server-Unterverzeichnisse. Beispiel: wenn dein Shop "www.domain.tdl/euershop/" liegt, m?sste es heissen: RewriteRule ^(.*).php/(.*)/(.*)$ /euershop/$1.php?$2=$3 [L] wenn der Shop auf "www.domain.tdl" liegt, dann entsprechend so: RewriteRule ^(.*).php/(.*)/(.*)$ /$1.php?$2=$3 [L] MediaDialog |
|
|||
|
Gibt es auch eine m?glichkeit in xtc ein mod rewrite wo dann in der domain der
Name des Produktes und die endung php in htm oder html ausgibt? http://www.shop.de/categorie1/categorie2/produkt.htm oder html Gru? ruben |
|
|||
|
ok das w?re der inhalt
Code:
<?php /* ----------------------------------------------------------------------------------------- $Id: xtc_href_link.inc.php,v 1.5 2004/04/21 17:55:00 fanta2k Exp $ XT-Commerce - community made shopping http://www.xt-commerce.com Copyright (c) 2003 XT-Commerce ----------------------------------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(html_output.php,v 1.52 2003/03/19); www.oscommerce.com (c) 2003 nextcommerce (xtc_href_link.inc.php,v 1.3 2003/08/13); www.nextcommerce.org Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ // The HTML href link wrapper function function xtc_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $http_domain, $https_domain; if (!xtc_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (xtc_not_null($parameters)) { $link .= $page . '?' . $parameters; $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (defined('SID') && xtc_not_null(SID)) { $sid = SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if ($http_domain != $https_domain) { $sid = session_name() . '=' . session_id(); } } } if (xtc_check_agent()==1) { $sid=NULL; } if (isset($sid)) { $link .= $separator . $sid; } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } return $link; } function xtc_href_link_admin($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $http_domain, $https_domain; if (!xtc_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (xtc_not_null($parameters)) { $link .= $page . '?' . $parameters; $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (defined('SID') && xtc_not_null(SID)) { $sid = SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if ($http_domain != $https_domain) { $sid = session_name() . '=' . session_id(); } } } if (xtc_check_agent()==1) { $sid=NULL; } if (isset($sid)) { $link .= $separator . $sid; } return $link; } ?> |
|
|||
|
immer langsam mit den jungen pferden.
ich hab das system gerade seit einer woche drauf. also: die aufrufe von "xtc_href_link.inc.php" kommen von der datei: "/includes/application_top.php" damit beim aufruf auch die produkt- und kategorienamen im klartext ?bergeben werden. dann k?nnte man "http://www.domain.tdl/categoriename-1_2/produktname-123.htm" daraus machen. mehr kann ich dir im moment nicht sagen, da ich einfach keine zeit habe weiterzugucken. MediaDialog |
![]() |
| Lesezeichen |
| Stichworte |
| mod, rewrite, sumafreundliche, urls, xtc |
| Themen-Optionen | |
| Ansicht | |
|
|