+ Antworten
Ergebnis 1 bis 9 von 9

Thema: mod_rewrite Ausnahme zur htaccess hinzufügen

  1. #1
    Neu an Board Avatar von mosesjohann
    Registriert seit
    20.05.2010
    Ort
    AUT, Salzburg
    Beiträge
    6
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard mod_rewrite Ausnahme zur htaccess hinzufügen

    Hallo Liebe Gemeinde!

    Hat mich total gewundert, dass das Problem noch keiner hatte bzw. noch keiner die Frage gestellt hat:

    Wie kann eine Regel für die .htaccess aussehen, in der man den Zugriff auf bestimmte Ordner nicht umschreiben will - bei mir wäre das jetzt konkret www.comhome.at/lists . Seit der Aktivierung der SEO-Funktionen bei Joomla funktioniert die zwar alle, nur meine anderen Unterseiten, welche sich im gleichen Ordner befinden, sind - natürlich - nicht mehr erreichbar.

    Da ich kein Spezialist bin im Schreiben von htaccess-Dateien bitte ich euch um Lösungsvorschläge - danke im Voraus!
    Be the change you want to see in the world
    Mohandas Karamchand Gandhi
    www.comhome.at

  2. #2
    Hat hier eine Zweitwohnung Avatar von progandy
    Registriert seit
    25.06.2007
    Beiträge
    1.936
    Bedankte sich
    13
    Erhielt 638 Danksagungen
    in 575 Beiträgen

    Standard

    Du musst dazu zu dem rewrite-Block eine weitere RewriteCond für jedes Verzeichnis erstellen und es so ausschließen. Folgendes ist ungetestet, müsste aber funktionieren
    Code:
    ########## Begin - Joomla! core SEF Section
    #
    # ignoriere alle Links, die mit lists beginnen
    RewriteCond %{REQUEST_URI} !^/lists(/|$)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
    RewriteRule (.*) index.php
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    #
    ########## End - Joomla! core SEF Section
    Suche und FAQ helfen bei Problemen oft weiter!

  3. #3
    Neu an Board Avatar von mosesjohann
    Registriert seit
    20.05.2010
    Ort
    AUT, Salzburg
    Beiträge
    6
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Hi progandy!

    Danke für deine Antwort - funktioniert aber leider bei mir nicht. Blöd gefragt, aber wenn man jz www.comhome.at/lists aufruft kommt nun - wie vorher - der Fehler 500. Das Abspeichern der geänderten .htaccess reicht doch, da muss man doch nichts neu laden wenn ich das Prinzip verstanden habe - oder?

    emefge
    Be the change you want to see in the world
    Mohandas Karamchand Gandhi
    www.comhome.at

  4. #4
    Hat hier eine Zweitwohnung Avatar von progandy
    Registriert seit
    25.06.2007
    Beiträge
    1.936
    Bedankte sich
    13
    Erhielt 638 Danksagungen
    in 575 Beiträgen

    Standard

    Ich habe nicht die komplette .htaccess gepostet, sondern nur den Bereich rund um die Änderung. Ich vermute eher, dass eine htaccess oder so in dem 'lists'-Verzeichnis einen Fehler hat, da die restliche Seite ja funktioniert.

    PS: Kannst du mal deine komplette .htaccess posten?
    Suche und FAQ helfen bei Problemen oft weiter!

  5. #5
    Neu an Board Avatar von mosesjohann
    Registriert seit
    20.05.2010
    Ort
    AUT, Salzburg
    Beiträge
    6
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Du hast recht, da ist wirlich eine drin - daran hätte ich nicht gedacht:

    Code:
    DirectoryIndex index.php
    
    <FilesMatch "\.(php|inc)$">
    Order allow,deny
    deny from all
    </FilesMatch>
    <FilesMatch "(index.php|dl.php|ut.php|lt.php|download.php)$">
    Order allow,deny
    allow from all
    </FilesMatch>
    php_flag magic_quotes_gpc on
    und das ist die im root-ordner:

    Code:
    ##
    # @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
    # @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!
    #
    ## Deny access to extension xml files (uncomment out to activate)
    #<Files ~ "\.xml$">
    #Order allow,deny
    #Deny from all
    #Satisfy all
    #</Files>
    ## End of deny access to extension xml files
    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 ********** tag in URL
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Send all blocked request to homepage with 403 Forbidden error!
    RewriteRule ^(.*)$ index.php [F,L]
    #
    ########## 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 (just / for root)
    
    RewriteBase /
    
    
    ########## Begin - Joomla! core SEF Section
    #
    RewriteCond %{REQUEST_URI} !^/lists(/|$)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
    RewriteRule (.*) index.php
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
    #
    ########## End - Joomla! core SEF Section
    #
    Be the change you want to see in the world
    Mohandas Karamchand Gandhi
    www.comhome.at

  6. #6
    Neu an Board Avatar von mosesjohann
    Registriert seit
    20.05.2010
    Ort
    AUT, Salzburg
    Beiträge
    6
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Da alle anderen Subverzeichnise einwandfrei funktionieren hab ichs jetzt einfach so gelöst, dass ich die htaccess in /lists und /lists/admin umbenannt habe und es funktioniert einwandfrei.

    emefge
    Be the change you want to see in the world
    Mohandas Karamchand Gandhi
    www.comhome.at

  7. #7
    Hat hier eine Zweitwohnung Avatar von progandy
    Registriert seit
    25.06.2007
    Beiträge
    1.936
    Bedankte sich
    13
    Erhielt 638 Danksagungen
    in 575 Beiträgen

    Standard

    Entweder erlaubt dein Hoster php_flag nicht in der .htaccess oder <FilesMatch ist nicht erlaubt oder beides.
    Suche und FAQ helfen bei Problemen oft weiter!

  8. #8
    Neu an Board Avatar von mosesjohann
    Registriert seit
    20.05.2010
    Ort
    AUT, Salzburg
    Beiträge
    6
    Bedankte sich
    0
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Vorher hat das ja funktioniert, komisch. Da ich mein eigener Hoster bin, kann ichs ja versuchen umzustellen - danke!
    Be the change you want to see in the world
    Mohandas Karamchand Gandhi
    www.comhome.at

  9. #9
    Neu an Board
    Registriert seit
    19.07.2008
    Beiträge
    56
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard

    Zitat Zitat von mosesjohann Beitrag anzeigen
    Da alle anderen Subverzeichnise einwandfrei funktionieren hab ichs jetzt einfach so gelöst, dass ich die htaccess in /lists und /lists/admin umbenannt habe und es funktioniert einwandfrei.

    emefge
    was meinst du damit "unbennant"?

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein