Seite 1 von 1

Brauche Hilfe bei Weiterleitung

Verfasst: 11.06.2010, 08:45
von Deep Thought
Bin in einem anderen Thema von 800XE darauf aufmerksam gemacht worden, dass meine www Weiterleitung nicht wie gewünscht auf forum-entspannung.de sondern auf forum-entspannung.de/index.php springt. Danke nochmal für den Hinweis! Ich kann aber in der Weiterleitungsregel keinen Fehler entdecken:

Code: Alles auswählen

RewriteCond %{HTTP_HOST} !^forum-entspannung\.de$
RewriteRule ^(.*)$ http://forum-entspannung.de/$1 [L,R=301] 
hab ich übrigens hier aus dem Forum :)
Vielleicht zur Info es ist ne Joomla-Seite und hier noch die volle htaccess:

Code: Alles auswählen

##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
#Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

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


RewriteCond %&#123;HTTP_HOST&#125; !^forum-entspannung\.de$
RewriteRule ^&#40;.*&#41;$ http&#58;//forum-entspannung.de/$1 &#91;L,R=301&#93;

#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory &#40;just / for root&#41; 
Danke schon mal!!
Gruß Peter

Verfasst:
von

Verfasst: 11.06.2010, 09:26
von sx06050
Ändere mal auf folgendes ab.


RewriteCond %{HTTP_HOST} ^forum-entspannung\.de$ [NC]
RewriteRule ^(.*)$ https://www.forum-entspannung.de/$1 [R=301,L]


Gib Bescheid, ob´s funzt.

Verfasst: 11.06.2010, 12:04
von Deep Thought
Whow ging ja schnell!! Vielen Dank! Es funzt!
musste die Regel zwar umstellen, da ich die Domain ohne www wollte:

Code: Alles auswählen

RewriteCond %&#123;HTTP_HOST&#125; ^www.forum-entspannung\.de$ &#91;NC&#93;
RewriteRule ^&#40;.*&#41;$ http&#58;//forum-entspannung.de/$1 &#91;R=301,L&#93;
oder hat sich da ein Fehler eingeschlichen?

Auf jeden Fall erfolgt die Weiterleitung jetzt auf forum-entspannung.de ohne index :)

Verfasst:
von

Verfasst: 11.06.2010, 12:42
von sx06050
Keine Ursache