#1 (permalink)  
Alt 02.07.2004, 00:05
 
Registriert seit: 24.06.2004
Beiträge: 6
Standard

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 06.07.2004, 15:06
Benutzerbild von stp69  
Registriert seit: 02.03.2004
Beiträge: 125
Standard

hab ich getestet, funktioniert leider nicht....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 06.07.2004, 15:09
Benutzerbild von stp69  
Registriert seit: 02.03.2004
Beiträge: 125
Standard

moment sehe gerade /euershop/ wie war das gleich?? Sorry war wohl etwas voreilig...

Wir haben den Shop in ein Verzeichniss kopiert:
root/cmd/index.php
die .htaccess liegt im root/cmd/.htaccess

Was genau mu? bei /euershop/ rein?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 06.07.2004, 15:33
HHGAG
Gast
 
Beiträge: n/a
Standard

Shopverzeichnis m?sste es sein :z:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 07.07.2004, 10:07
 
Registriert seit: 24.06.2004
Beiträge: 6
Standard

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 07.07.2004, 14:33
 
Registriert seit: 27.06.2004
Beiträge: 37
Standard

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 07.07.2004, 15:32
 
Registriert seit: 24.06.2004
Beiträge: 6
Standard

da musst du direkt die datei "xtc_href_link.inc.php" (im /inc/-Verzeichnis) editieren

MediaDialog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 07.07.2004, 15:39
 
Registriert seit: 27.06.2004
Beiträge: 37
Standard

Du weist nicht zuf?llig wie das genau geht oder??

MFG
Ruben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 07.07.2004, 15:42
 
Registriert seit: 27.06.2004
Beiträge: 37
Standard

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;
 }

 ?>
was m?sste ich jetzt hier ?ndern?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #10 (permalink)  
Alt 07.07.2004, 20:57
 
Registriert seit: 24.06.2004
Beiträge: 6
Standard

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
mod, rewrite, sumafreundliche, urls, xtc

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 08:09 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand