Hallo Jörg,
Die Reihenfolge habe ich geändert, den Cache gelöscht, aber es tut sich nichts. Ich lande immer noch auf der Startseite.
Für die Weiterleitung nach https würde ich zudem auch den Flag R=301 verwenden:
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
Habe ich das nicht mit der oben stehenden Zeile gemacht?
Die .htaccess im Unterverzeichnis lautet:
AuthName "Cronimport"
AuthType Basic
AuthUserFile "/www/182578_70794/rp-hosting/xxx/xxx/typo3cms/t3v7/xtc2/xxx/.htpasswd"
require valid-user
Diese .htaccess Datei befindet sich in /xtc2/xxx/ ?
Ja
Befindet sich im übergeordneten Verzeichnis /xtc2/ auch noch eine .htaccess Datei (des Shops)?
Ja aber die ist ziemlich lang:
##-- $Id: _.htaccess 2670 2012-02-23 12:53:47Z dokuman $
##-- Default charset
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
# Disable directory browsing
Options All -Indexes
##-- 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>
##-- 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
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
##-- set the following line like e.g.: RewriteBase /shop
RewriteBase /xtc2
##-- Use canonical URLs
##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
RewriteCond %{HTTP_HOST} !^www.okp.de$ [NC]
RewriteRule ^(.*)$ https://www.okp.de/$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$ https://%{HTTP_HOST}/ [R=301,L]
##-- Sitemap
RewriteRule ^sitemap(.*)\.html$ shop_content.php?coID=8 [QSA,L]
# language(isset) filetype=php
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.+\.php$
RewriteRule ^([a-z]{2})(\/.+\.php)$ $2?language=$1 [qsappend,L]
RewriteCond %{REQUEST_URI} !(\/piwik\/)
RewriteRule ^(.+\.php)$ $1?language=default [qsappend,L]
# language(default=default) cpath(isset) page(default=1)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*:::[_0-9]+:{0,1}[0-9]+\.html$
RewriteRule ^([a-z]{2})\/.*:::([_0-9]+):([0-9]+)\.html$ /xtc2/index.php?language=$1&cPath=$2&page=$3 [qsappend,L]
RewriteRule ^.*:::([_0-9]+):+([0-9]+)\.html$ /xtc2/index.php?language=default&cPath=$1&page=$2 [qsappend,L]
RewriteRule ^([a-z]{2})\/.*:::([_0-9]+)\.html$ /xtc2/index.php?language=$1&cPath=$2&page=1 [qsappend,L]
RewriteRule ^.*:::([_0-9]+)\.html$ /xtc2/index.php?language=default&cPath=$1&page=1 [qsappend,L]
# language(default=default) cpath(isset) products_id(isset)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*:::[_0-9]+\/.*::[0-9]+.*\.html$
RewriteRule ^([a-z]{2})\/.*:::([_0-9]+)\/.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=$1&cPath=$2&products_id=$3 [qsappend,L]
RewriteRule ^.*:::([_0-9]+)\/.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=default&cPath=$1&products_id=$2 [qsappend,L]
# language(default=default) manufacturers_id(isset) products_id(isset)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*:.:[_0-9]+\/.*::[0-9]+.*\.html$
RewriteRule ^([a-z]{2})\/.*:.:([_0-9]+)\/.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=$1&manufacturers_id=$2&products_id=$3 [qsappend,L]
RewriteRule ^.*:.:([_0-9]+)\/.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=default&manufacturers_id=$1&products_id=$2 [qsappend,L]
# language(default=default) products_id(isset)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*::[0-9]+.*\.html$
RewriteRule ^([a-z]{2})\/.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=$1&products_id=$2 [qsappend,L]
RewriteRule ^.*::([0-9]+).*\.html$ /xtc2/product_info.php?language=default&products_id=$1 [qsappend,L]
# language(default=default) coid(isset)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*:_:[0-9]+\.html$
RewriteRule ^([a-z]{2})\/*.*:_:([0-9]+)\.html$ /xtc2/shop_content.php?language=$1&coID=$2 [qsappend,L]
RewriteRule ^.*:_:([0-9]+)\.html$ /xtc2/shop_content.php?language=default&coID=$1 [qsappend,L]
# language(default=default) manufacturers_id(isset) page(default=1)
RewriteCond %{REQUEST_URI} ^[a-z]*\/*.*:.:[_0-9]+:{0,1}[0-9]+\.html$
RewriteRule ^([a-z]{2})\/.*:.:([_0-9]+):([0-9]+)\.html$ /xtc2/index.php?language=$1&manufacturers_id=$2&page=$3 [qsappend,L]
RewriteRule ^.*:.:([_0-9]+):+([0-9]+)\.html$ /xtc2/index.php?language=default&manufacturers_id=$1&page=$2 [qsappend,L]
RewriteRule ^([a-z]{2})\/.*:.:([_0-9]+)\.html$ /xtc2/index.php?language=$1&manufacturers_id=$2&page=1 [qsappend,L]
RewriteRule ^.*:.:([_0-9]+)\.html$ /xtc2/index.php?language=default&manufacturers_id=$1&page=1 [qsappend,L]
# language (default=default)
RewriteCond %{REQUEST_URI} ^[a-z]*.*$
RewriteRule ^([a-z]{2})$ /xtc2/index.php?language=$1 [qsappend,L]
RewriteRule ^([a-z]{2})\/index\.html$ /xtc2/index.php?language=$1 [qsappend,L]
RewriteRule ^[\/index\.html]*$ /xtc2/index.php?language=default [qsappend,L]
</IfModule>
Ist /xtc2/xxx/ ein reales Verzeichnis im Dateisystem oder legst du dieses erst an, um darin .htaccess und .htpasswd abzulegen?
Das Verzeichnis gibt es schon. Und mein Programm xxx.php?parameter läuft darin auch. Theoretisch kann ich es aber in jedem Vezeichnis laufen lassen. Nur geschützt muss es sein.
Viele Grüße
Marianne