Trade Republic - Provisionsfrei Aktien handeln
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: htaccess - wie geht das?

    MagnusR

    • Neu im Forum
    • Beiträge: 18
    • Geschlecht:
    htaccess - wie geht das?
    am: 21. September 2013, 16:30:25
    Hallo,

    ich komme mit diesem Ding nicht klar.

    Wir hatten in einem alten Shop eine Kategorie

    www.meins/shop/ersatzteile/alko/

    darin die Artikel.

    diese Artikel sollen in den "Ausweichshop" www.meinsA
    umgezogen werden. (Sind sie bereits)

    www.meinsA/alko/ersatzteile/

    Diese 38.000 Artikel sollten jetzt neuerdings
    über eine Umleitung gefunden werden, da sie ja in "meins/shop..."
    nicht mehr sind und Google das gar nicht gefällt.

    Gibt es denn dafür eine brauchbare htaccess?

    Ich bin für jede Idee dankbar.

    Gruß
    Magnus

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

    Alfred

    • Experte
    • Beiträge: 2.115
    Re: htaccess - wie geht das?
    Antwort #1 am: 21. September 2013, 18:28:43
    Code: PHP  [Auswählen]
    RewriteCond %{HTTP_HOST} ^www.meins/shop/ersatzteile/alko/$ [NC]
    RewriteRule ^(.*) www.meinsA/alko/ersatzteile/$1 [L,R=301]

    MagnusR

    • Neu im Forum
    • Beiträge: 18
    • Geschlecht:
    Re: htaccess - wie geht das?
    Antwort #2 am: 21. September 2013, 20:09:35
    Mehrfachen Dank für deine Hilfe.

    Für mich beschäment wie wenig Zeilen
    das bewirken sollen. Dachte da an 1 bis 2
    Seiten.

    MagnusR

    • Neu im Forum
    • Beiträge: 18
    • Geschlecht:
    Re: htaccess - wie geht das?
    Antwort #3 am: 21. September 2013, 21:02:22
    # $Id: .htaccess,v 1.5 2005/05/19 17:09:19 Administrator Exp $
    #
    # If your shop runs in a subfolder, for example "www.domain.de/shop/"
    # you can use this .htaccess as a template.
    # Simply search and replace "/xtc_mod/" with the folder-name of your
    # custom installation-folder like "/shop/" or something.
    #
    # Attention: Leave the slashes "/" as is!
    #
    # This is used with Apache WebServers
    #
    # For this to work, you must include the parameter 'Options' to
    # the AllowOverride configuration
    #
    # Example:
    #
    #<Directory "/usr/local/apache/htdocs">
    #   AllowOverride Options
    #</Directory>
    #
    # 'All' with also work. (This configuration is in the
    # apache/conf/httpd.conf file)
    # The following makes adjustments to the SSL protocol for Internet
    # Explorer browsers
    <IfModule mod_setenvif.c>
      <IfDefine SSL>
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
      </IfDefine>
    </IfModule>

    # Fix certain PHP values
    # (commented out by default to prevent errors occuring on certain
    # servers)
    #<IfModule mod_php4.c>
    #  php_value session.use_trans_sid 0
    #  php_value register_globals 1
    #</IfModule>

    #-- set expire header for image, pdf, js and css files for 30 days
    #<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|js|css)$" >
    #  Header set Cache-Control "max-age=2592000, public"
    #</FilesMatch>

    #-- Turn off ETags in HTTP-header
    #FileETag None

    #-- Call time pass reference error ?!
    #php_flag  allow_call_time_pass_reference On

    #-- XTC Session only on first visit
    #php_flag session.use_trans_sid 0

    #-----------------------------------------
    #- SEO Hartmut König
    #-----------------------------------------
    #-- ! Comment this line, if you get an ERROR 500 !
    #Options +FollowSymlinks

    # http://httpd.apache.org/docs/misc/rewriteguide.html
    RewriteEngine on

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

    ##-- Kategorien
    RewriteCond %{REQUEST_URI} (.*):::([_0-9]+):([_0-9]+)\.html$
    RewriteRule (.*):::([_0-9]+):([_0-9]+)\.html$ /xtc_mod/index.php?cPath=$2&page=$3 [qsappend,L]
    RewriteCond %{REQUEST_URI} (.*):::([_0-9]+)\.html$
    RewriteRule (.*):::([_0-9]+)\.html$ /xtc_mod/index.php?cPath=$2 [qsappend,L]

    ##-- Produkte
    RewriteRule (.*)::(.+)\.html$ /xtc_mod/product_info.php?products_id=$2 [qsappend,L]

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

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

    ##-- Fehlerseiten auf die Sitemap lotsen
    ErrorDocument 400 /xtc_mod/sitemap.html?error=400
    ErrorDocument 401 /xtc_mod/sitemap.html?error=401
    ErrorDocument 402 /xtc_mod/sitemap.html?error=402
    ErrorDocument 403 /xtc_mod/sitemap.html?error=403
    ErrorDocument 404 /xtc_mod/sitemap.html?error=404
    ErrorDocument 500 /xtc_mod/sitemap.html?error=500

    ##-- BOF - Tomcraft - 2009-09-09 - Use canonical URLs
    # (don't use if your shop runs on a subdomain!)
    #
    #RewriteCond %{HTTP_HOST} !^www\. [NC]
    #RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/xtc_mod/$1 [L,R=301]
    #
    ##-- EOF - Tomcraft - 2009-09-09 - Use canonical URLs

    Naja, wie ich schon erklärt habe, aber wo baue ich das Teil ein?

    Alfred

    • Experte
    • Beiträge: 2.115
    Re: htaccess - wie geht das?
    Antwort #4 am: 21. September 2013, 21:26:35
    Naja, wie ich schon erklärt habe, aber wo baue ich das Teil ein?

    Unter

    Code: PHP  [Auswählen]
    RewriteEngine on

    und nur bei "meins" in der .htaccess
    rechtstexte für onlineshop
    7 Antworten
    4374 Aufrufe
    12. Februar 2012, 19:37:13 von Matt
    0 Antworten
    1814 Aufrufe
    26. Mai 2012, 01:23:24 von misterwong
    39 Antworten
    22689 Aufrufe
    04. April 2015, 17:09:14 von kostja984
    16 Antworten
    10045 Aufrufe
    19. März 2017, 13:59:57 von awids