Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.

Mal wieder eine .htaccess Frage

Ajax, Hijax, Microformats, RDF, Markup, HTML, PHP, CSS, MySQL, htaccess, robots.txt, CGI, Java, Javascript usw.
Neues Thema Antworten
cz-wellmed
PostRank 1
PostRank 1
Beiträge: 3
Registriert: 24.09.2008, 18:17

Beitrag von cz-wellmed » 24.09.2008, 19:08

Hallo,

habe wie viele hier eine Frage zu der .htaccess-Datei in Verbindung mit Joomla. Wegen Doppelten Content habe ich http:// zu https://www. weitergeleitet. Das hat auch super funktioniert.

Code siehe hier:

Code: Alles auswählen

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain\.de$
RewriteRule ^(.*)$ http://www.domain.de/$1 [L,R=301]

Dann wollte ich die Startseite (www.domain.de/index.php) zu www.domain.de/ per 301 weiterleiten. Da fing das Problem an! Alles was ich versuchte klappte irgendwie nicht. Wie kann ich das machen?

Hier mal der Rest meiner htaccess:

Code: Alles auswählen

########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section

########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 

404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %&#123;QUERY_STRING&#125; &#40;\<|%3C&#41;.*script.*&#40;\>|%3E&#41; &#91;NC,OR&#93;
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %&#123;QUERY_STRING&#125; GLOBALS&#40;=|\&#91;|\%&#91;0-9A-Z&#93;&#123;0,2&#125;&#41; &#91;OR&#93;
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %&#123;QUERY_STRING&#125; _REQUEST&#40;=|\&#91;|\%&#91;0-9A-Z&#93;&#123;0,2&#125;&#41;
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^&#40;.*&#41;$ index.php &#91;F,L&#93;
#
########## End - Rewrite rules to block out some common exploits

Danke ...