Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: suchmaschinenfreundliche URL // v1.06 mod_rew

    demonheart

    • Neu im Forum
    • Beiträge: 16
    • Geschlecht:
    suchmaschinenfreundliche URL // v1.06 mod_rew
    am: 22. Januar 2014, 15:07:05
    Ich habe im Forum gesucht und auch einiges zum Thema gefunden...

    Meine Frage ist damit aber trotzdem nicht beantwortet.

    Hat sich in der neuen Shop-Version in der .htaccess was geändert?

    Bei mir sieht die jetzt folgendermaßen aus:
    Code: XML  [Auswählen]
    #  -----------------------------------------------------------------------------------------
    #  $Id: .htaccess,v 1.1 2004/03/25 14:37:46 fanta2k Exp $
    #
    #   XT-Commerce - ebusiness solutions
    #   http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte Forenregeln beachten! ))
    #
    #   Copyright (c) 2003 XT-Commerce
    #  -----------------------------------------------------------------------------------------
    #  based on:
    #  (c) 2000-2001 The Exchange Project
    #  (c) 2002-2003 osCommerce (.htaccess,v 1.4 2001/04/22); www.oscommerce.com
    #  (c) 2003      nextcommerce (.htaccess,v 1.3 2003/08/13); www.nextcommerce.org
    #
    #  Released under the GNU General Public License
    #  -----------------------------------------------------------------------------------------
    #
    # This is used with Apache WebServers
    # The following blocks direct HTTP requests in this directory recursively
    #
    # For this to work, you must include the parameter 'Limit' to the AllowOverride configuration
    #
    # Example:
    #
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit
    #
    # 'All' with also work. (This configuration is in your apache/conf/httpd.conf file)
    #
    # This does not affect PHP include/require functions
    #
    # Example: http://server/catalog/includes/application_top.php will not work

    <Files *.html>
    Order Deny,Allow
    Deny from all
    </Files>
    <Files *.php>
    Order Deny,Allow
    Deny from all
    </Files>
     

    mod_rew ist auf dem Server aktiviert, mein Shop liegt in einem Unterverzeichnis, wo muss ich denn jetzt was eintragen???

    Linkback: https://www.modified-shop.org/forum/index.php?topic=29043.0
    Modulshop - Eine große Auswahl an neuen und hilfreichen Modulen für die modified eCommerce Shopsoftware

    ShopNix

    • Viel Schreiber
    • Beiträge: 1.208
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #1 am: 22. Januar 2014, 15:14:58
    Zitat
    Hat sich in der neuen Shop-Version in der .htaccess was geändert?
    gegenüber dem, was Du gepostet hast: Ja, fast alles.

    demonheart

    • Neu im Forum
    • Beiträge: 16
    • Geschlecht:
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #2 am: 22. Januar 2014, 15:18:07
    Die gepostete Datei ist aber die, die in dem Downloadpaket der neuen Version drin ist!

    ShopNix

    • Viel Schreiber
    • Beiträge: 1.208
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #3 am: 22. Januar 2014, 15:20:33
    Mag sein, wird aber während der Installation neu geschrieben und heißt dann _htaccess (oder so)

    demonheart

    • Neu im Forum
    • Beiträge: 16
    • Geschlecht:
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #4 am: 22. Januar 2014, 15:41:28
    Oh Mann, bin ich blond...

    ich habe jetzt die Datei vom Server genommen. Leider habe ich trotzdem das Problem, dass die umgeschriebenen Seiten nicht gefunden werden und ich finde den Fehler nicht.

    Folgendes steht jetzt in der Datei
    Code: XML  [Auswählen]
    ##-- $Id: .htaccess 3209 2012-07-12 11:51:11Z gtb-modified $

    ##-- Default charset
    #AddDefaultCharset UTF-8
    AddDefaultCharset ISO-8859-15

    ##-- Disable the server signature
    ServerSignature Off

    ##-- Turn off ETags in HTTP-header (use both directives)
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    FileETag None

    ##-- When caching of gzipped JS and CSS files is used, enable this setting
    #<IfModule mod_headers.c>
    #  Header set Vary Accept-Encoding
    #</IfModule>

    ##-- when using Provider 1&1 set the following lines to activate PHP5
    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

    # Disable directory browsing (disabled by default as this causes problems on some servers)
    #Options All -Indexes

    ##-- Enable the compression for any type of content
    #<IfModule mod_deflate.c>
    #  <FilesMatch "\\.(js|css|html|htm|php|xml|jpg|jpeg|png|gif)$">
    #    SetOutputFilter DEFLATE
    #  </FilesMatch>
    #</IfModule>

    ##-- Customization of HTTP request and response headers
    <IfModule mod_headers.c>
     <FilesMatch "\\.(ico|jpe?g|png|gif|swf|flv)$">
       Header set Cache-Control "max-age=2592000, public"
     </FilesMatch>
     <FilesMatch "\\.(css)$">
       Header set Cache-Control "max-age=604800, public"
     </FilesMatch>
     <FilesMatch "\\.(js)$">
       Header set Cache-Control "max-age=216000, private"
     </FilesMatch>
     <FilesMatch "\\.(xml|txt)$">
       Header set Cache-Control "max-age=216000, public, must-revalidate"
     </FilesMatch>
     <FilesMatch "\\.(html|htm|php)$">
       Header set Cache-Control "max-age=1, private, must-revalidate"
     </FilesMatch>
    </IfModule>

    ##-- Generation of Expires and Cache-Control HTTP headers
    <IfModule mod_expires.c>
     ExpiresActive On
     ExpiresDefault "access plus 1 seconds"
     ExpiresByType image/gif "access plus 2592000 seconds"
     ExpiresByType image/jpeg "access plus 2592000 seconds"
     ExpiresByType image/png "access plus 2592000 seconds"
     ExpiresByType text/html "access plus 1 seconds"
     ExpiresByType text/css "access plus 604800 seconds"
     ExpiresByType text/javascript "access plus 216000 seconds"
     ExpiresByType application/x-javascript "access plus 216000 seconds"
    </IfModule>

    ##-- Configure php_flags if necessary
    ##-- BEGIN - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #<IfModule mod_php.c>

     ##-- Warn when arguments are passed by reference at function call time (from PHP5 allow_call_time_pass_reference is deprecated)
     #php_flag allow_call_time_pass_reference on

     ##-- Disable transparent sid support PHP-default is off (XTC Session only on first visit)
     #php_flag session.use_trans_sid off

     ##-- set suhosin flags because of errors with attributes (for webhosters with suhosin hardening patch enabled)
     #php_value suhosin.post.max_array_depth 0
     #php_value suhosin.post.max_array_index_length 0
     #php_value suhosin.post.max_vars 0
     #php_value suhosin.request.max_array_depth 0
     #php_value suhosin.request.max_array_index_length 0
     #php_value suhosin.request.max_vars 0

     ##-- set suhosin flags to have unencrypted session data, affecting "whos_online" & "shopping cart" (for webhosters with suhosin hardening patch enabled)patch enabled
     #php_value suhosin.session.encrypt Off
     #php_value suhosin.session.cryptkey ''

    ##-- END - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #</IfModule>

    ##-- Redirect error pages to Sitemap
    ##-- set the correct Path to ErrorDocument
    ErrorDocument 400 /sitemap.html?error=400
    ErrorDocument 401 /sitemap.html?error=401
    ErrorDocument 402 /sitemap.html?error=402
    ErrorDocument 403 /sitemap.html?error=403
    ErrorDocument 404 /sitemap.html?error=404
    ErrorDocument 500 /sitemap.html?error=500

    ##-----------------------------------------
    ##- SEO Shopstat Modul (Hartmut Koenig)
    ##-----------------------------------------
    <IfModule mod_rewrite.c>
     ##-- Initialize and enable rewrite engine
     ##-- Documentation http://httpd.apache.org/docs/misc/rewriteguide.html
     RewriteEngine On

     ##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
     ##-- set the following line like e.g.: RewriteBase /shop/
     RewriteBase /

     ##-- Use canonical URLs
     ##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
     ##-- HostEurope
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl\.webpack\.de$ [NC]
     ##-- 1und1
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl\.kundenserver\.de$ [NC]
     ##-- domainFACTORY
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^sslsites\.de$ [NC]
     ##-- All-Inkl
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl-account\.com$ [NC]
     ##-- Strato
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^www\.ssl-id\.de$ [NC]

     #RewriteCond %{HTTP_HOST}                 !^www\.(.*) [NC]
     #RewriteCond %{HTTP_HOST}                 !^(.*)\.(.*)\.(.*) [NC]
     #RewriteCond %{HTTP_HOST}                 !^localhost(.*)$ [NC]
     #RewriteRule ^(.*)                        http://www.%{HTTP_HOST}/$1 [R=301,L]

     ##-- Sitemap
     RewriteRule ^sitemap(.*)\.html$ shop_content.php?coID=8 [QSA,L]

     ##----------------------------------------------------------------------------------
     ##-- When working with SEO-Urls you can decide, whether to use a colon ":" or a dash "-" symbol
     ##-- (Windows Servers might have problems with colon as delimiter!)
     ##-- Change the delimiter symbol also in file "/inc/shopstat_functions.inc.php"
     ##----------------------------------------------------------------------------------

     ##-- Use colon delimiter ":" for SEO-URLS (default setting)
     ##-- Categories (:::)
     RewriteCond %{REQUEST_URI} (.*):::([_0-9]+):([_0-9]+)\.html$
     RewriteRule (.*):::([_0-9]+):([_0-9]+)\.html$ index.php?cPath=$2&page=$3 [QSA,L]
     RewriteCond %{REQUEST_URI} (.*):::([_0-9]+)\.html$
     RewriteRule (.*):::([_0-9]+)\.html$ index.php?cPath=$2 [QSA,L]

     ##-- Products (::)
     RewriteRule (.*)::(.+)\.html$ product_info.php?products_id=$2 [QSA,L]

     ##-- Content (:_:)
     RewriteRule (.*):_:([0-9]+)\.html$ shop_content.php?coID=$2 [QSA,L]

     ##-- Manufacturers (:.:)
     RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+):([_0-9]+)\.html$
     RewriteRule (.*):.:([_0-9]+):([_0-9]+)\.html$ index.php?manufacturers_id=$2&page=$3 [QSA,L]
     RewriteCond %{REQUEST_URI} (.*):.:([_0-9]+)\.html$
     RewriteRule (.*):.:([0-9]+)\.html$ index.php?manufacturers_id=$2 [QSA,L]

     ##-- Use dash delimiter "-" for SEO-URLS
     ##-- Categories (---)
     RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)-([_0-9]+)\.html$
     RewriteRule (.*)---([_0-9]+)-([_0-9]+)\.html$ index.php?cPath=$2&page=$3 [QSA,L]
     RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)\.html$
     RewriteRule (.*)---([_0-9]+)\.html$ index.php?cPath=$2 [QSA,L]

     ##-- Products (--)
     RewriteRule (.*)--(.+)\.html$ product_info.php?products_id=$2 [QSA,L]

     ##-- Content (-_-)
     RewriteRule (.*)-_-([0-9]+)\.html$ shop_content.php?coID=$2 [QSA,L]

     ##-- Manufacturers (-.-)
     RewriteCond %{REQUEST_URI} (.*)-.-([_0-9]+)-([_0-9]+)\.html$
     RewriteRule (.*)-.-([_0-9]+)-([_0-9]+)\.html$ index.php?manufacturers_id=$2&page=$3 [QSA,L]
     RewriteCond %{REQUEST_URI} (.*)-.-([_0-9]+)\.html$
     RewriteRule (.*)-.-([0-9]+)\.html$ index.php?manufacturers_id=$2 [QSA,L]
    </IfModule>
     

    Die .htaccess liegt im Unterverzeichnis und beim Aufruf der Katalogseite wird der Shop auch aufgerufen. Sobald eine andere Seite aufgerufen wird, kommt die Fehlerseite 404

    ShopNix

    • Viel Schreiber
    • Beiträge: 1.208
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #5 am: 22. Januar 2014, 16:07:03
    Zitat
    htaccess liegt im Unterverzeichnis

    Weiß nicht, ob ich das richtig interpretiere, aber wenn Dein Shop in einem Unterverzeichnis liegt, muss der Pfad hinter RewriteBase stehen.

    demonheart

    • Neu im Forum
    • Beiträge: 16
    • Geschlecht:
    Re: suchmaschinenfreundliche URL // v1.06 mod_rew
    Antwort #6 am: 22. Januar 2014, 16:23:04
    ja, dachte ich auch...

    die einzige Auswirkung war, dass die Seite und der Adminbereich gar nicht mehr aufrufbar waren.

    Habe das Ganze jetzt aber noch mal getestet und den Fehler gefunden. Ich hatte zuvor den zwischen Slash und Unterverzeichnis anscheinend ein Leerzeichen und bekam somit nur einen 500er zurück.

    Problem ist jetzt gelöst, danke dir für die Hilfe!
    Modulshop - Eine große Auswahl an neuen und hilfreichen Modulen für die modified eCommerce Shopsoftware
    3 Antworten
    3281 Aufrufe
    15. Februar 2012, 09:47:47 von Petruschka
    6 Antworten
    3084 Aufrufe
    30. April 2010, 12:35:10 von leex
    5 Antworten
    3793 Aufrufe
    20. Juli 2012, 18:18:50 von macca
    8 Antworten
    5148 Aufrufe
    31. August 2012, 11:19:44 von Alfred