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: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen

    PatKol

    • Mitglied
    • Beiträge: 178
    Moin zusammen,
    ich habe gestern die Suchfunktion gequält, allerdings nicht wirklich fündig geworden. Mein Shop liegt im Unterverzeichnis und ich möchte Ihn nun gern auf die Hauptdomain umleiten. Habe über meinen Provider eine Weiterleitung veranlasst, was sich als Schwachsinn rausgestellt hat, weil alle Verlinkungen ins Leere gehen  :datz:  Wie geht man korrekterweise vor?

    So sieht derzeit meine .htaccess (liegt im Unterverzeichnis) aus:
    Code: PHP  [Auswählen]
    ##-- $Id: _.htaccess 2670 2012-02-23 12:53:47Z dokuman $

    ##-- 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>

    ## Hoster 1&1 (activate PHP5)
    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

    ##-- 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
    ##-- 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 ''
    #</IfModule>

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

    ##-- Redirect error pages to Sitemap
    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 König)
    ##-----------------------------------------
    <IfModule mod_rewrite.c>
      ##-- Initialize and enable rewrite engine
     RewriteEngine On

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

      ##-- Use canonical URLs
     ##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
     RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl\.webpack\.de$ [NC]
      RewriteCond %{HTTP:X-Forwarded-Server}   !^sslsites\.de$ [NC]
      RewriteCond %{HTTP_HOST}                 !^www\..* [NC]
      RewriteCond %{HTTP_HOST}                 !^.*\..*\..* [NC]
      RewriteCond %{HTTP_HOST}                 !^localhost(.*)$ [NC]
      RewriteCond %{REMOTE_ADDR}               !127.0.0.1$ [NC]
      RewriteRule ^(.*)                        http://www.%{HTTP_HOST}/$1 [R=301,L]
     
      #-- redirect /folder/index.php to /folder/ (i.e. hide index.php)
     RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
      RewriteRule ^index\.php$ http://%{HTTP_HOST}/ [R=301,L]

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

      ##----------------------------------------------------------------------------------
     ##-- When working with SEO-Urls you can decide, wheter 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>

    Vielen Dank!

    Grüße Pat Kol

    Linkback: https://www.modified-shop.org/forum/index.php?topic=23047.0

    PatKol

    • Mitglied
    • Beiträge: 178
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #1 am: 29. Oktober 2012, 23:01:34
    Ich habe jetzt noch folgendes geändert:

    Code: PHP  [Auswählen]
     ##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
    ##-- set the following line like e.g.: RewriteBase /shop
    RewriteBase /bestcarparts

    in

    Code: PHP  [Auswählen]
     ##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
    ##-- set the following line like e.g.: RewriteBase /shop
    RewriteBase /

    Die Weiterleitung beim Provider
    von www.example.com auf /unterverzeichnis
    bzw. example.com auf /unterverzeichnis
    ist weiterhin drin!

    Was müsste noch geändert werden, damit alles korrekt läuft?

    PatKol

    • Mitglied
    • Beiträge: 178
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #2 am: 30. Oktober 2012, 02:06:46
    Hat sich erledigt! Hab erstmal die alte .htaccess gelöscht! Dann habe ich mit dem Installer die Konfigurationsdateien neu aufgesetzt und die .htaccess wieder eingefügt! Läuft endlich!

    Alfred

    • Experte
    • Beiträge: 2.115
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #3 am: 30. Oktober 2012, 09:06:23
    Hallo,

    und ein Artikellink mit /shop landet richtig auf dem Link ohne /shop?
    Ist wichtig....

    Gruß

    PatKol

    • Mitglied
    • Beiträge: 178
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #4 am: 30. Oktober 2012, 10:12:05
    Ja, das geht nun alles! Allerdings habe ich ein anderes Problem:

    Es gibt ein Unterverzeichnis blog, indem ich Wordpress installiert habe. Dieser war bis vor der Weiterleitung beim Provider unter www.example.com/blog erreichbar.

    Die Weiterleitung example.com auf /shop bzw. www.example.com auf /shop verursacht, dass der Ordner blog nicht mehr erreichbar ist.

    Kennt sich jemand soweit aus, dass er mir sagen kann, wie ich jetzt in das Backend von Wordpress komme bzw. welche Einstellungen ich jetzt ändern müsste, damit Wordpress wieder unter www.example.com/blog erreichbar ist?

    Danke!

    PatKol

    • Mitglied
    • Beiträge: 178
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #5 am: 30. Oktober 2012, 23:38:41
    Niemand eine Idee?

    PatKol

    • Mitglied
    • Beiträge: 178
    Re: Shop auf Unterverzeichnis --> Auf Hauptdomain setzen
    Antwort #6 am: 01. November 2012, 11:00:27
    Erledigt: Weiterleitung wieder rausgenommen, anschließend Pfade im WP-Backend geändert, Ordner Blog (WP komplett) in den Shopordner verschoben, Weiterleitung wieder reingenommen!
    Trade Republic - Provisionsfrei Aktien handeln
    3 Antworten
    3173 Aufrufe
    16. Oktober 2015, 09:34:06 von olivius
    3 Antworten
    2902 Aufrufe
    10. Februar 2011, 18:52:50 von Tomcraft
    2 Antworten
    1950 Aufrufe
    10. Juni 2018, 09:47:55 von Lars72
    1 Antworten
    3175 Aufrufe
    28. November 2011, 15:14:21 von Matt
               
    anything