Neu Wie eine Ausnahme in .htaccess für Google HTML Datei machen?

Status
Es sind keine weiteren Antworten möglich.

User32532

Aktives Mitglied
17. März 2021
35
1
Hallo,
Ich habe Google HTML-Datei in Hauptverzeichnis hochgeladen.
Beim öffnen der Link meinedomende/googlefb3d41da295d9911.html ich würde auf meinedomende/kategorie/ weitergeleitet.
Was muss in .htaccess Datei geändert sein, damit Google HTML Datei nicht weitergeleitet wird und auf der Webseite erreichbar wird?


Code:
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
      SetEnvIf Origin ":" IS_CORS
      Header set Access-Control-Allow-Origin "*" env=IS_CORS
    </FilesMatch>

    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  </IfModule>
</IfModule>

<IfModule mod_filter.c>
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE \
      "application/atom+xml" \
      "application/javascript" \
      "application/json" \
      "application/ld+json" \
      "application/manifest+json" \
      "application/rdf+xml" \
      "application/rss+xml" \
      "application/schema+json" \
      "application/vnd.geo+json" \
      "application/vnd.ms-fontobject" \
      "application/x-font-ttf" \
      "application/x-javascript" \
      "application/x-web-app-manifest+json" \
      "application/xhtml+xml" \
      "application/xml" \
      "font/eot" \
      "font/opentype" \
      "image/bmp" \
      "image/svg+xml" \
      "image/vnd.microsoft.icon" \
      "image/x-icon" \
      "text/cache-manifest" \
      "text/css" \
      "text/html" \
      "text/javascript" \
      "text/plain" \
      "text/vcard" \
      "text/vnd.rim.location.xloc" \
      "text/vtt" \
      "text/x-component" \
      "text/x-cross-domain-policy" \
      "text/xml"
  </IfModule>
  <IfModule mod_mime.c>
    AddEncoding gzip svgz
  </IfModule>
</IfModule>

<IfModule !mod_filter.c>
  <IfModule mod_deflate.c>
    <FilesMatch "\\.(js|css|html|htm|xml)$">
      SetOutputFilter DEFLATE
    </FilesMatch>
  </IfModule>
</IfModule>

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresDefault "access plus 1 months"
</IfModule>

<IfModule mod_headers.c>
  Header unset ETag

  Header set X-UA-Compatible "IE=edge"
  Header set X-Content-Type-Options "nosniff"
  Header unset X-Powered-By

  <FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>

  <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|webmanifest|woff2?|xloc|xml|xpi)$">
    Header unset X-UA-Compatible
  </FilesMatch>
</IfModule>

<IfModule mod_rewrite.c>
  RewriteEngine on

  #REWRITE ANPASSUNG 1 (REWRITEBASE)
  #Wenn Ihr Shop in einem Unterverzeichnis (also z.B. meinedomain.de/meinverzeichnis) installiert ist, so kommentieren Sie die kommende Zeile aus und passen Sie den Verzeichnisnamen an
  #RewriteBase /

  #REWRITE ANPASSUNG 2 (auf www.meinedomain.de umleiten)
  #Ihr Shop sollte nicht unter www.meinedomain.de und nur meinedomain.de erreichbar sein, siehe: http://guide.jtl-software.de/index.php?title=JTL-Shop3-Neuinstallation#4._Einrichtung_einer_Domainweiterleitung
  #RewriteCond %{HTTP_HOST} ^meinedomain.de
  #RewriteRule ^(.*)$ http://www.meinedomain.de/$1 [r=301,L]
  RewriteRule ^(.*)\.html$ https://reco.de/$1 [R=301,L]
  RewriteRule ^media/pdf/(.*)$ https://reco.de/mediafiles/pdf/$1 [R=301,L]
  RewriteRule ^catalog/product_compare/(.*)$ https://reco.de/ [R=301,L]
  RewriteRule ^wishlist/(.*)$ https://reco.de/ [R=301,L]
  RewriteRule ^sendfriend/(.*)$ https://reco.de/ [R=301,L]
  RewriteRule ^productalert/(.*)$ https://reco.de/ [R=301,L]

  #REWRITE ANPASSUNG 3 (Entfernt abschließenden Slash per 301-Redirect)
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{REQUEST_URI} ^(.*)/$
  #RewriteRule ^. %1 [L,R=301]

  #Rewrite der JTL-Shop-URLs
  #Aendern Sie an diesen Zeilen nichts!
  RewriteRule ^templates_c/filecache/.*$ - [R=403,NC,L]
  RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ includes/sitemap.php?datei=$1 [L]
  RewriteRule ^export/((sitemap_).*\.(xml|txt)(\.gz)?)$ $1 [L]
  RewriteRule ^asset/(.*)$ includes/libs/minify/?g=$1 [L]
  RewriteRule ^robots.txt$ robots.php [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^. index.php [L]
</IfModule>

FileETag None
#Server Signatur deaktivieren
#ServerSignature Off

Danke Vorraus.
 

User32532

Aktives Mitglied
17. März 2021
35
1
Ist das für die Bestätigung der Google Search Konsole?

Ich würde da nicht in der Datei rumfummeln, sondern eine andere Methode wählen… Zum Beispiel über Google Analytics oder über das Meta Tag...

Letzteres kannst du hierrüber einbinden:

https://www.netzdinge.de/Lizenz-Plugin-Google-Codes

Das ist für Google Merchant Center.
Wenn ich Google META Tag in Template header.tpl einfüge, passiert nichts. Nach dem Hochladen Google META Tag aus header.tpl Datei verschwindet. Ich weis nicht warum.

Code:
{block name="head"}
<head>
    {block name="head-meta"}
        <meta http-equiv="content-type" content="text/html; charset={$smarty.const.JTL_CHARSET}">
        <meta property="og:url" content="{$cCanonicalURL}"/>
        <meta name="google-site-verification" content="w61fyQ8tZZdvJIJIT361fyQ8tZZ3161fyQ8tZZ1Ya0Zo-sppsvsGs" />
    {/block}

    <title itemprop="name">{block name="head-title"}{$meta_title}{/block}</title>
 
Zuletzt bearbeitet:

Enrico W.

Administrator
Mitarbeiter
27. November 2014
9.218
1.958
Beiträge werden nicht gelöscht, weil sie erledigt sind. Andere User sollen auch noch davon etwas lernen können. Wir können das Thema daher lediglich schließen.
 
Status
Es sind keine weiteren Antworten möglich.

Ähnliche Themen