Ergebnis 1 bis 16 von 16

Thema: Subdomain - Urls umschreiben

  1. #1
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard Subdomain - Urls umschreiben

    Hallo,

    ich habe eine Contao 3.5 Installation auf eine Subdomain (http://southisland.islandcharters.co.uk) umgezogen.
    Im Kontrollzentrum des Webhosters, zeigt die Subdomain auf das Verzeichnis /subdomains/southisland welches somit zum Home Verzeichnis wird.

    Wenn ich nun Im Backend Urls umschreiben anklicke und die .htaccess aktiviere, bekomme ich den Fehler das es kein Verzeichnis oder Datei gefunden werden kann.
    Warning: require(__DIR__/system/initialize.php) [function.require]: failed to open stream: No such file or directory in /var/sites/s/southisland.islandcharters.co.uk/public_html/index.php on line 16
    Wer kann helfen? Danke!

    LG Leooo


    Anbei mal die .htaccess Datei:

    Code:
    ##
    # Contao Open Source CMS
    #
    # Copyright (c) 2005-2016 Leo Feyer
    #
    # @license LGPL-3.0+
    ##
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
      </IfModule>
      <IfModule mod_authz_core.c>
        Require all denied
      </IfModule>
    </FilesMatch>
    
    ##
    # Allow access from all domains for webfonts
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      AddType application/javascript              js jsonp
      AddType application/json                    json
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff woff2
      AddType image/x-icon                        ico
      AddType image/webp                          webp
      AddType text/cache-manifest                 appcache manifest
      AddType text/x-component                    htc
      AddType application/xml                     rss atom xml rdf
      AddType application/x-web-app-manifest+json webapp
      AddType text/x-vcard                        vcf
      AddType application/x-shockwave-flash       swf
    </IfModule>
    
    ##
    # Gzip compression
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_deflate.c>
      <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
        AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
        AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
      </IfModule>
    </IfModule>
    
    ##
    # Expires headers (for better cache control)
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_expires.c>
      ExpiresActive on
    
      ##
      # Productional website
      ##
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpeg                    "access plus 1 month"
      ExpiresByType image/x-icon                  "access plus 1 month"
      ExpiresByType video/ogg                     "access plus 1 month"
      ExpiresByType audio/ogg                     "access plus 1 month"
      ExpiresByType video/mp4                     "access plus 1 month"
      ExpiresByType video/webm                    "access plus 1 month"
      ExpiresByType text/x-component              "access plus 1 month"
      ExpiresByType application/x-font-ttf        "access plus 1 month"
      ExpiresByType font/opentype                 "access plus 1 month"
      ExpiresByType application/x-font-woff       "access plus 1 month"
      ExpiresByType image/svg+xml                 "access plus 1 month"
      ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #ExpiresByType text/cache-manifest           "access"
      #ExpiresByType text/html                     "access"
      #ExpiresByType text/xml                      "access"
      #ExpiresByType application/xml               "access"
      #ExpiresByType application/json              "access"
      #ExpiresByType application/rss+xml           "access"
      #ExpiresByType application/atom+xml          "access"
      #ExpiresByType image/gif                     "access"
      #ExpiresByType image/png                     "access"
      #ExpiresByType image/jpeg                    "access"
      #ExpiresByType image/x-icon                  "access"
      #ExpiresByType video/ogg                     "access"
      #ExpiresByType audio/ogg                     "access"
      #ExpiresByType video/mp4                     "access"
      #ExpiresByType video/webm                    "access"
      #ExpiresByType text/x-component              "access"
      #ExpiresByType application/x-font-ttf        "access"
      #ExpiresByType font/opentype                 "access"
      #ExpiresByType application/x-font-woff       "access"
      #ExpiresByType image/svg+xml                 "access"
      #ExpiresByType application/vnd.ms-fontobject "access"
      #ExpiresByType text/css                      "access"
      #ExpiresByType application/javascript        "access"
    
    </IfModule>
    
    ##
    # Header adjustments
    ##
    <IfModule mod_headers.c>
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #Header unset Cache-Control
      #Header append Cache-Control must-revalidate
    
      ##
      # Do not cache the cron.txt file
      # @see https://github.com/contao/core/issues/5105
      ##
      <FilesMatch "cron\.txt$">
        Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
      </FilesMatch>
    
      ##
      # Add a Vary Accept-Encoding header for the compressed resources. If you
      # modify the file types above, make sure to change them here accordingly.
      # @see http://developer.yahoo.com/performance/rules.html#gzip
      #
      # Note: If you are using a case-sensitive file system like HFS+ or ext4, you
      # have to change the <FilesMatch> directive as follows:
      #
      # <FilesMatch "\.(?i:js|css|xml|gz|svgz)$">
      #
      # For more information see: https://github.com/contao/core/issues/4364
      ##
      <FilesMatch "\.(js|css|xml|gz|svgz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    
      ##
      # Do not cache source map files
      # @see https://github.com/contao/core/issues/8532
      ##
      <FilesMatch "\.map$">
        Header set Expires "0"
        Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
      </FilesMatch>
    
    </IfModule>
    
    ##
    # Disable MultiViews if you are having issues with requests returning the wrong
    # page. Requires AllowOverride Options=All,MultiViews to be set here.
    # @see https://github.com/contao/core/issues/3521
    ##
    #Options -MultiViews
    
    ##
    # URL rewriting
    ##
    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      ##
      # Change the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-3.0.0
      #   RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely.
      ##
      RewriteBase /
    
      ##
      # Uncomment the following lines to add "www." to the domain:
      #
      #   RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
      #   RewriteRule (.*) http://www.example.com/$1 [R=301,L]
      #
      # Uncomment the following lines to remove "www." from the domain:
      #
      #   RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
      #   RewriteRule (.*) http://example.com/$1 [R=301,L]
      #
      # Make sure to replace "example.com" with your domain name.
      ##
    
      ##
      # If you cannot use mod_deflate, uncomment the following lines to load a
      # compressed .gz version of the aggregated Contao JavaScript and CSS files.
      ##
      #AddEncoding gzip .gz
      #<FilesMatch "\.js\.gz$">
      #  AddType "application/javascript" .gz
      #</FilesMatch>
      #<FilesMatch "\.css\.gz$">
      #  AddType "text/css" .gz
      #</FilesMatch>
      #RewriteCond %{HTTP:Accept-encoding} gzip
      #RewriteCond %{REQUEST_FILENAME} \.(js|css)$
      #RewriteCond %{REQUEST_FILENAME}.gz -f
      #RewriteRule ^(.*)$ $1.gz [QSA,L]
    
      ##
      # By default, Contao adds ".html" to the generated URLs to simulate static
      # HTML documents. If you change the URL suffix in the back end settings, make
      # sure to change it here accordingly!
      #
      #   RewriteRule .*\.html$ index.php [L]   # URL suffix .html
      #   RewriteRule .*\.txt$ index.php [L]    # URL suffix .txt
      #   RewriteRule .*\.json$ index.php [L]   # URL suffix .json
      #
      # If you do not want to use an URL suffix at all, you have to add a third
      # line to prevent URLs that point to folders from being rewritten (see #4031).
      #
      #   RewriteCond %{REQUEST_FILENAME} !-d
      #   RewriteRule .* index.php [L]
      #
      # If you are using mod_cache, it is recommended to use the RewriteRule below,
      # which adds the query string to the internal URL:
      #
      #   RewriteRule (.*\.html)$ index.php/$1 [L]
      #
      # Note that not all environments support mod_rewrite and mod_cache.
      ##
      RewriteCond %{REQUEST_FILENAME} !\.(htm|php|js|css|map|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|otf|tt[cf]|woff2?|svgz?|pdf|zip|gz)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule .*\.html$ index.php [L]
    
      ##
      # The following rules are required if you want to pass the language as first
      # URL parameter (added in Contao 2.11). The first rule rewrites the empty URL
      # to the front end controller, the second one adds a missing trailing slash.
      ##
      RewriteRule ^[a-z]{2}(\-[A-Z]{2})?/$ index.php [L]
      RewriteRule ^([a-z]{2}(\-[A-Z]{2})?)$ $1/ [R=301,L]
    
    </IfModule>
    Gruß/Greetings, leooo

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.114
    Partner-ID
    10107

    Standard

    Laut der Fehlermeldung befindet sich die Installation im Pfad
    Code:
    /var/sites/s/southisland.islandcharters.co.uk/public_html/
    Ist das korrekt?

  3. #3
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    Hallo Spooky,

    nein das ist nicht korrekt.

    Die Installation liegt unter: /subdomains/southisland
    Vor dem Umzug lag sie in /public_html

    Wenn ich mich über das Kontrollzentrum des Hosters oder per FTP einlogge sehe keinen Ordner Namens public_html im Subdomain Verzeichnis.

    LG Leooo
    Gruß/Greetings, leooo

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.114
    Partner-ID
    10107

    Standard

    Wie gesagt, laut der Fehlermeldung wurde
    Code:
    /var/sites/s/southisland.islandcharters.co.uk/public_html/index.php
    aufgerufen. Lösche mal den Inhalt von /system/cache.

  5. #5
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    das hilft leider auch nichts... ich glaube ich wende mich am an den Webhoster.
    Gruß/Greetings, leooo

  6. #6
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    Hallo nochmal,

    steht der Pfad zur Installation auch in der DB?

    Der Webhoster sagte mir auch nur das der Pfad wohl im CMS hinterlegt ist.... wo steht bloß /public_html/ drin?

    LG Leooo
    Gruß/Greetings, leooo

  7. #7
    Community-Moderator & Contao-Urgestein Avatar von derRenner
    Registriert seit
    23.10.2012.
    Ort
    hoRn|waldviertel
    Beiträge
    2.862
    Contao-Projekt unterstützen

    Support Contao

    Standard

    hast du nach der Aktivierung und der Änderung der .htaccess auch mal das install-tool (install.php) drüber laufen lassen?
    Grüsse
    Bernhard


  8. #8
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Zitat Zitat von leooo Beitrag anzeigen
    steht der Pfad zur Installation auch in der DB?
    .... wo steht bloß /public_html/ drin?
    Das steht nirgends drin. Und innerhalb von Contao sollte im Normalfall nirgendwo eine URL auf die Installation hardcodiert eingetragen werden. Das passiert alles dynamisch, sonst könnte man z.B. auch nur sehr schwer umziehen.

    Die index.php wird ja bereits in
    Code:
    /var/sites/s/southisland.islandcharters.co.uk/public_html/
    aufgerufen. D.h. wenn du dein FE aufrufen möchtest mit deiner Domain sub.example.org, dann leitet dich der Server in diesen Ordner. Die index.php scheint die von Contao zu sein, warum der die Datei system/initialize.php nicht findet weiß ich auch nicht. Wahrscheinlich, weil sie nicht da ist.

    Mach erstmal den Check wie empfohlen. Die .htaccess hättest du nicht zu posten brauchen, das ist die aktuellste aus 3.5.24, die kennen wir selber.

    Wenn's dann noch nicht geht, dann mach in der index.php mal
    PHP-Code:
    var_dump(__DIR__); 
    Und schau auch mal, ob in der system/config/pathconfig.php vielleicht aus Versehen ein Pfad eingetragen wurde.
    Geändert von Andreas (15.02.2017 um 16:54 Uhr)
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  9. #9
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    Hallo,

    also in der pathconfig.php ist kein Pfad drin, das Install Tool habe ich aufgerufen und alles ist im grünen Bereich und das Contao Check Tool sagt auch das alles up to date ist.

    Code:
    var_dump(__DIR__);
    ergab folgendes: string(57) "/var/sites/s/southisland.islandcharters.co.uk/public_html"

    Verstehe ich es richtig das die Dateien also in /public_html liegen? Den Ordner sehe ich weder im FTP Programm noch in dem Filebrowser des Control Panels vom Webhoster.


    VG Leooo
    Gruß/Greetings, leooo

  10. #10
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Wie hast du das var_dump denn in die index.php eintragen können, wenn du den Ordner public_html nicht siehst? Ist der vielleicht die oberste Ebene zu der du Zugang hast? Aber selbst wenn, müssten in gleicher Ebene wie die index.php ja auch der Ordner system/ liegen.
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  11. #11
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Mit welchen URLs rufst du das BE, das FE, das Installtool und das Check auf?
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  12. #12

  13. #13
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Ok, soweit funktioniert ja jetzt erstmal alles.

    Und wenn du jetzt die Umschreibung aktivieren möchtest mit der originalen .htaccess, dann geht es nicht mehr?

    Hast du vielleicht noch einen übergeordneten Ordner, wo eine .htaccess drin liegt?

    Versuche auch mal den RewriteBase zu manipulieren. .htaccess:
    PHP-Code:
      ##
      # Change the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-3.0.0
      #   RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely.
      ##
      
    RewriteBase 
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  14. #14
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    Hallo.

    Also wenn ich mich per FTP einlogge, dann sehe ich folgendes:
    .htaccess mit folgendem Inhalt
    Code:
    CheckSpelling Off
    AddType x-httpd-php56 .php
    - mysql_backups
    - public_html
    -- hier liegt ein weiteres CMS
    - subdomains
    --southisland


    Sobald ich die .htaccess.default aktiviere kommen die Fehlermeldungen:

    Code:
    Warning: require(__DIR__/system/initialize.php) [function.require]: failed to open stream: No such file or directory in /var/sites/s/southisland.islandcharters.co.uk/public_html/index.php on line 16
    
    Warning: require(__DIR__/system/initialize.php) [function.require]: failed to open stream: No such file or directory in /var/sites/s/southisland.islandcharters.co.uk/public_html/index.php on line 16
    
    Fatal error: require() [function.require]: Failed opening required '__DIR__/system/initialize.php' (include_path='.:/usr/local/lib/php') in /var/sites/s/southisland.islandcharters.co.uk/public_html/index.php on line 16
    Gruß/Greetings, leooo

  15. #15
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Mmh, dann muss ich erstmal aussteigen, habe keine Idee mehr. Welcher Hoster?
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  16. #16
    Contao-Nutzer
    Registriert seit
    23.06.2009.
    Ort
    Heide / Holstein
    Beiträge
    203

    Standard

    TSOhost aus U.K

    Vielen Dank für Deine Mühe, ich werde nochmal mit dem Hoster in Kontakt treten, angeblich gibt es noch eine andere Möglichkeit die Subdomains anzulegen.

    Halte Euch auf dem Laufenden.

    Schönen Abend noch.
    Gruß/Greetings, leooo

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

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