Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 40 von 69

Thema: (Gelöst): Startseite erzeugt 404-Fehler

  1. #1
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard (Gelöst): Startseite erzeugt 404-Fehler

    Ich habe folgendes Problem:
    Ich habe eine interne Domaimumleitung auf ein Unterverzeichnis des Servers. Im Root des Servers liegt folgende .htaccess und eine einfache index.html.
    Code:
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2012 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2012
    # @author     Leo Feyer <http://www.contao.org>
    # @license    LGPL
    ##
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      Order allow,deny
      Deny from all
    </FilesMatch>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      # JavaScript
      AddType application/javascript              js jsonp
      AddType application/json                    json
      # Audio
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      # Video
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p 
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      # SVG
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      # Webfonts
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff
      # Assorted types
      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>
      # Current Apache versions (>= 2.2)
      <IfModule filter_module>
        FilterDeclare   COMPRESS
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
        FilterChain     COMPRESS
        FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
      </IfModule>
      # Legacy Apache versions
      <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
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      # Data
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      # Feed
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      # Media: images, video, audio
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpg                     "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"
      # HTC files  (css3pie)
      ExpiresByType text/x-component              "access plus 1 month"
      # Webfonts
      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"
      # CSS and JavaScript
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    </IfModule>
    
    ##
    # 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
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    </IfModule>
    
    ##
    # 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-2.11.0
      #   RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely. 
      ##
      RewriteBase /Mathe-Aufgaben-Nachhilfe
    
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
      #RewriteCond %{HTTP_HOST} ^domain\.com [NC]
      #RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
      RewriteCond %{HTTP_HOST} ^mathiki\.de [NC]
      RewriteRule (.*) http://www.mathiki.de/$1 [R=301,L]
    
      ##
      # 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 "text/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]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents. Do not add the URL suffix here!
      ##
      <FilesMatch "\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|eot|woff|svg|ttf|pdf|gz)$">
        RewriteEngine On
      </FilesMatch>
    
      ##
      # 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 second
      # line to prevent URLs that point to folders from being rewritten (see #4031).
      #
      #   RewriteCond %{REQUEST_FILENAME} !-d
      #
      # 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.
      ##
       RewriteRule .*$ index.php [L]
      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 an empty URL
      # to the front end controller, the second one adds a missing trailing slash.
      ##
      RewriteRule ^[a-z]{2}/$ index.php [L]
      RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
    
     # Fehlerseite für den 404 - Seite nicht gefunden
    ErrorDocument 404 /Mathe-Aufgaben-Nachhilfe/index.php
    
    </IfModule>
    Laut www.webconfs.com/redirect-check.php funktioniert die Umleitung fehlerlos.
    Nun wollte ich mir eine aussagefähige 404-Seite basteln (mit Sitemap...), die nicht wie bisher auf die Homeseite weiterleitet. Als ich nun alles eingestellt habe, stellte ich fest, dass wenn ich im Browser www.mathiki.de eingebe, er automatisch auf die Fehlerseite verzweigt. Früher ist mir das nicht aufgefallen, da ich ja eine automatische Umleitung eingestellt hatte. Ich wunderte mich jedoch schon immer, warum ich im Log immer wieder einmal diese Meldung bekam:


    ID: 49887
    Datum: 2012-12-03 10:26
    Ursprung: Frontend
    Kategorie: ERROR
    Benutzer:
    Details: No active page for page ID "", host "www.mathiki.de" and languages "de, en" (http://www.mathiki.de/Mathe-Aufgaben-Nachhilfe//)
    Funktion: PageError404 generate()
    IP Adresse: 82.82.214.0
    Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11

    Komisch ist dieser doppelte Slash am Ende.
    Kann mir von Euch jemand weiterhelfen? Das wäre ganz nett. Ich bin hier ganz neu. Ich benutze zur Zeit die Version 2.11.4.
    Geändert von Limes (05.12.2012 um 06:30 Uhr)

  2. #2
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Hallo.

    Schau mal im Startpunkt der Webseite, ob unter Seitenstruktur->Domainname "www.mathiki.de" steht.
    oder besser: Sag' mal was da steht.

    Gruß
    while(!asleep()) {sheep++;}

  3. #3
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Beim Domainnamen steht gar nichts.
    Geändert von Limes (03.12.2012 um 11:44 Uhr)

  4. #4
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Dann trag' das mal ein. Also: "www.mathiki.de" ideal wäre dann noch ein permanenter redirect von "mathiki.de" auf "www.mathiki.de" damit es die Seite nur einmal gibt.


    Code:
    RewriteCond %{HTTP_HOST} ^domain\.com$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
    
    zur htaccess hinzufügen.
    Dann wird mathiki.de auf www.mathiki.de umgeleitet
    . natürlich nur wenn du das willst. google würde sich freuen. ;-)

    Sag' bescheid, ob es geholfen hat.
    Geändert von Toad (03.12.2012 um 12:08 Uhr)
    while(!asleep()) {sheep++;}

  5. #5
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Gesicht zeigt die Zunge

    Hab ich hingeschrieben. Anschließend Browsercache gelöscht und Systemwartung durchfahren lassen - der Fehler kommt weiterhin.

    In der .htaccess steht ja bis jetzt dies:

    Code:
     RewriteCond %{HTTP_HOST} ^mathiki\.de [NC]
      RewriteRule (.*) http://www.mathiki.de/$1 [R=301,L]
    Soll ich stattdessen "domain" schreiben????
    Geändert von Limes (03.12.2012 um 12:14 Uhr)

  6. #6
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard AW: Startseite erzeugt 404-Fehler

    Ja, sorry, Holzweg ...


    >> # Fehlerseite für den 404 - Seite nicht gefunden
    ErrorDocument 404 /Mathe-Aufgaben-Nachhilfe/index.php


    Die Fehlerseite in der htaccess hast du hinzugefügt, oder? Probier mal mit http://... Also volle Adresse.
    Bin auf der Arbeit, daher kann ich erst heute Abend so wirklich. Ist Index.php wirklich richtig?
    Hmmm.

    Gesendet von meinem HTC Desire S mit Tapatalk 2
    Geändert von Toad (03.12.2012 um 12:23 Uhr)
    while(!asleep()) {sheep++;}

  7. #7
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Zitat Zitat von Limes Beitrag anzeigen
    Hab ich hingeschrieben. Anschließend Browsercache gelöscht und Systemwartung durchfahren lassen - der Fehler kommt weiterhin.

    In der .htaccess steht ja bis jetzt dies:

    Code:
     RewriteCond %{HTTP_HOST} ^mathiki\.de [NC]
      RewriteRule (.*) http://www.mathiki.de/$1 [R=301,L]
    Soll ich stattdessen "domain" schreiben????
    Ne, ist OK wie es ist.
    while(!asleep()) {sheep++;}

  8. #8
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Du meinst, ich soll http:// im Domainnamen meiner Startseite mit angeben?. Wenn ich es dort mache, dann klaut Contao mir das http:// beim speichern und schreibt wieder nur www.mathiki.de hin.

    Auch wenn ich es in den Fehlercode der .htaccess schreibe, ändert sich auch nix.

    Die eigentliche index.php liegt ja im Unterverzeichnis Mathe-Aufgaben-Nachhilfe. An der habe ich noch gar nichts gemacht. Muss ich etwa an die noch ran? Sie sieht so aus:

    Code:
    <?php
    
    /**
     * Contao Open Source CMS
     * Copyright (C) 2005-2012 Leo Feyer
     *
     * Formerly known as TYPOlight Open Source CMS.
     *
     * This program is free software: you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public
     * License as published by the Free Software Foundation, either
     * version 3 of the License, or (at your option) any later version.
     * 
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
     * Lesser General Public License for more details.
     * 
     * You should have received a copy of the GNU Lesser General Public
     * License along with this program. If not, please visit the Free
     * Software Foundation website at <http://www.gnu.org/licenses/>.
     *
     * PHP version 5
     * @copyright  Leo Feyer 2005-2012
     * @author     Leo Feyer <http://www.contao.org>
     * @package    Frontend
     * @license    LGPL
     * @filesource
     */
    
    
    /**
     * Initialize the system
     */
    define('TL_MODE', 'FE');
    require('system/initialize.php');
    
    
    /**
     * Class Index
     *
     * Main front end controller.
     * @copyright  Leo Feyer 2005-2012
     * @author     Leo Feyer <http://www.contao.org>
     * @package    Controller
     */
    class Index extends Frontend
    {
    
    	/**
    	 * Initialize the object
    	 */
    	public function __construct()
    	{
    		// Try to read from cache
    		$this->outputFromCache();
    
    		// Redirect to the install tool
    		if (!Config::getInstance()->isComplete())
    		{
    			$this->redirect('contao/install.php');
    		}
    
    		// Load the user object before calling the parent constructor
    		$this->import('FrontendUser', 'User');
    		parent::__construct();
    
    		// Check whether a user is logged in
    		define('BE_USER_LOGGED_IN', $this->getLoginStatus('BE_USER_AUTH'));
    		define('FE_USER_LOGGED_IN', $this->getLoginStatus('FE_USER_AUTH'));
    	}
    
    
    	/**
    	 * Run the controller
    	 */
    	public function run()
    	{
    		global $objPage;
    		$pageId = $this->getPageIdFromUrl();
    
    		// Load a website root page object if there is no page ID
    		if ($pageId === null)
    		{
    			$objRootPage = $this->getRootPageFromUrl();
    			$objHandler = new $GLOBALS['TL_PTY']['root']();
    			$pageId = $objHandler->generate($objRootPage->id, true);
    		}
    		// Throw a 404 error if the request is not a Contao request (see #2864)
    		elseif ($pageId === false)
    		{
    			$this->User->authenticate();
    			$objHandler = new $GLOBALS['TL_PTY']['error_404']();
    			$objHandler->generate($pageId);
    		}
    		// Throw a 404 error if URL rewriting is active and the URL contains the index.php fragment
    		elseif ($GLOBALS['TL_CONFIG']['rewriteURL'] && strncmp($this->Environment->request, 'index.php/', 10) === 0)
    		{
    			$this->User->authenticate();
    			$objHandler = new $GLOBALS['TL_PTY']['error_404']();
    			$objHandler->generate($pageId);
    		}
    
    		$time = time();
    
    		// Get the current page object
    		$objPage = $this->Database->prepare("SELECT * FROM tl_page WHERE (id=? OR alias=?)" . (!BE_USER_LOGGED_IN ? " AND (start='' OR start<$time) AND (stop='' OR stop>$time) AND published=1" : ""))
    								  ->execute((is_numeric($pageId) ? $pageId : 0), $pageId);
    
    		// Check the URL and language of each page if there are multiple results
    		if ($objPage->numRows > 1)
    		{
    			$objNewPage = null;
    			$arrPages = array();
    
    			// Order by domain and language
    			while ($objPage->next())
    			{
    				$objCurrentPage = $this->getPageDetails($objPage->id);
    				$domain = ($objCurrentPage->domain != '') ? $objCurrentPage->domain : '*';
    				$arrPages[$domain][$objCurrentPage->rootLanguage] = $objCurrentPage;
    
    				// Also store the fallback language
    				if ($objCurrentPage->rootIsFallback)
    				{
    					$arrPages[$domain]['*'] = $objCurrentPage;
    				}
    			}
    
    			// Look for a root page whose domain name matches the host name
    			if (isset($arrPages[$this->Environment->host]))
    			{
    				$arrLangs = $arrPages[$this->Environment->host];
    			}
    			else
    			{
    				$arrLangs = $arrPages['*']; // Empty domain
    			}
    
    			// Try to find a page matching the language parameter
    			if (!$GLOBALS['TL_CONFIG']['addLanguageToUrl'])
    			{
    				$objNewPage = $arrLangs['*']; // Fallback language
    			}
    			elseif (($lang = $this->Input->get('language')) != '' && isset($arrLangs[$lang]))
    			{
    				$objNewPage = $arrLangs[$lang];
    			}
    
    			// Store the page object
    			if (is_object($objNewPage))
    			{
    				$objPage = $objNewPage;
    			}
    		}
    
    		// Throw a 404 error if the result is still ambiguous
    		if ($objPage->numRows != 1)
    		{
    			$this->User->authenticate();
    			$objHandler = new $GLOBALS['TL_PTY']['error_404']();
    			$objHandler->generate($pageId);
    		}
    
    		// Load a website root page object (will redirect to the first active regular page)
    		if ($objPage->type == 'root')
    		{
    			$objHandler = new $GLOBALS['TL_PTY']['root']();
    			$objHandler->generate($objPage->id);
    		}
    
    		// Inherit the settings from the parent pages if it has not been done yet
    		if (!is_bool($objPage->protected))
    		{
    			$objPage = $this->getPageDetails($objPage->id);
    		}
    
    		// Use the global date format if none is set
    		if ($objPage->dateFormat == '')
    		{
    			$objPage->dateFormat = $GLOBALS['TL_CONFIG']['dateFormat'];
    		}
    		if ($objPage->timeFormat == '')
    		{
    			$objPage->timeFormat = $GLOBALS['TL_CONFIG']['timeFormat'];
    		}
    		if ($objPage->datimFormat == '')
    		{
    			$objPage->datimFormat = $GLOBALS['TL_CONFIG']['datimFormat'];
    		}
    
    		// Set the admin e-mail address
    		if ($objPage->adminEmail != '')
    		{
    			list($GLOBALS['TL_ADMIN_NAME'], $GLOBALS['TL_ADMIN_EMAIL']) = $this->splitFriendlyName($objPage->adminEmail);
    		}
    		else
    		{
    			list($GLOBALS['TL_ADMIN_NAME'], $GLOBALS['TL_ADMIN_EMAIL']) = $this->splitFriendlyName($GLOBALS['TL_CONFIG']['adminEmail']);
    		}
    
    		// Exit if the root page has not been published (see #2425) and
    		// do not try to load the 404 page! It can cause an infinite loop.
    		if (!BE_USER_LOGGED_IN && !$objPage->rootIsPublic)
    		{
    			header('HTTP/1.1 404 Not Found');
    			die('Page not found');
    		}
    
    		// Check wether the language matches the root page language
    		if ($GLOBALS['TL_CONFIG']['addLanguageToUrl'] && $this->Input->get('language') != $objPage->rootLanguage)
    		{
    			$this->User->authenticate();
    			$objHandler = new $GLOBALS['TL_PTY']['error_404']();
    			$objHandler->generate($pageId);
    		}
    
    		// Check whether there are domain name restrictions
    		if ($objPage->domain != '')
    		{
    			// Load an error 404 page object
    			if ($objPage->domain != $this->Environment->host)
    			{
    				$this->User->authenticate();
    				$objHandler = new $GLOBALS['TL_PTY']['error_404']();
    				$objHandler->generate($objPage->id, $objPage->domain, $this->Environment->host);
    			}
    		}
    
    		// Authenticate the user
    		if (!$this->User->authenticate() && $objPage->protected && !BE_USER_LOGGED_IN)
    		{
    			$objHandler = new $GLOBALS['TL_PTY']['error_403']();
    			$objHandler->generate($pageId, $objRootPage);
    		}
    
    		// Check the user groups if the page is protected
    		if ($objPage->protected && !BE_USER_LOGGED_IN)
    		{
    			$arrGroups = $objPage->groups; // required for empty()
    
    			if (!is_array($arrGroups) || empty($arrGroups) || !count(array_intersect($arrGroups, $this->User->groups)))
    			{
    				$this->log('Page "' . $pageId . '" can only be accessed by groups "' . implode(', ', (array) $objPage->groups) . '" (current user groups: ' . implode(', ', $this->User->groups) . ')', 'Index run()', TL_ERROR);
    
    				$objHandler = new $GLOBALS['TL_PTY']['error_403']();
    				$objHandler->generate($pageId, $objRootPage);
    			}
    		}
    
    		// Load the page object depending on its type
    		$objHandler = new $GLOBALS['TL_PTY'][$objPage->type]();
    
    		switch ($objPage->type)
    		{
    			case 'root':
    			case 'error_404':
    				$objHandler->generate($pageId);
    				break;
    
    			case 'error_403':
    				$objHandler->generate($pageId, $objRootPage);
    				break;
    
    			default:
    				$objHandler->generate($objPage);
    				break;
    		}
    	}
    
    
    	/**
    	 * Try to load the page from the cache
    	 */
    	protected function outputFromCache()
    	{
    		// Build the page if a user is logged in or there is POST data
    		if (!empty($_POST) || $_SESSION['TL_USER_LOGGED_IN'] || $_SESSION['DISABLE_CACHE'] || isset($_SESSION['LOGIN_ERROR']) || $GLOBALS['TL_CONFIG']['debugMode'])
    		{
    			return;
    		}
    
    		$this->import('Environment');
    
    		/**
    		 * If the request string is empty, look for a cached page matching the
    		 * primary browser language. This is a compromise between not caching
    		 * empty requests at all and considering all browser languages, which
    		 * is not possible for various reasons.
    		 */
    		if ($this->Environment->request == '' || $this->Environment->request == 'index.php')
    		{
    			// Return if the language is added to the URL and the empty domain will be redirected
    			if ($GLOBALS['TL_CONFIG']['addLanguageToUrl'] && !$GLOBALS['TL_CONFIG']['doNotRedirectEmpty'])
    			{
    				return;
    			}
     
    			$strCacheKey = $this->Environment->base .'empty.'. $this->Environment->httpAcceptLanguage[0];
    		}
    		else
    		{
    			$strCacheKey = $this->Environment->base . $this->Environment->request;
    		}
    
    		// HOOK: add custom logic
    		if (isset($GLOBALS['TL_HOOKS']['getCacheKey']) && is_array($GLOBALS['TL_HOOKS']['getCacheKey']))
    		{
    			foreach ($GLOBALS['TL_HOOKS']['getCacheKey'] as $callback)
    			{
    				$this->import($callback[0]);
    				$strCacheKey = $this->$callback[0]->$callback[1]($strCacheKey);
    			}
    		}
    
    		$strCacheFile = TL_ROOT . '/system/tmp/' . md5($strCacheKey) . '.html';
    
    		// Return if the file does not exist
    		if (!file_exists($strCacheFile))
    		{
    			return;
    		}
    
    		$expire = null;
    		$content = null;
    
    		// Include the file
    		ob_start();
    		require_once($strCacheFile);
    
    		// The file has expired
    		if ($expire < time())
    		{
    			ob_end_clean();
    			return;
    		}
    
    		// Read the buffer
    		$strBuffer = ob_get_contents();
    		ob_end_clean();
    
    		// Session required to determine the referer
    		$this->import('Session');
    		$session = $this->Session->getData();
    
    		// Set the new referer
    		if (!isset($_GET['pdf']) && !isset($_GET['file']) && !isset($_GET['id']) && $session['referer']['current'] != $this->Environment->requestUri)
    		{
    			$session['referer']['last'] = $session['referer']['current'];
    			$session['referer']['current'] = $this->Environment->requestUri;
    		}
    
    		// Store the session data
    		$this->Session->setData($session);
    
    		// Load the default language file (see #2644)
    		$this->import('Config');
    		$this->loadLanguageFile('default');
    
    		// Replace the insert tags and then re-replace the request_token
    		// tag in case a form element has been loaded via insert tag
    		$strBuffer = $this->replaceInsertTags($strBuffer);
    		$strBuffer = str_replace(array('{{request_token}}', '[{]', '[}]'), array(REQUEST_TOKEN, '{{', '}}'), $strBuffer);
    
    		// Content type
    		if (!$content)
    		{
    			$content = 'text/html';
    		}
    
    		header('Vary: User-Agent', false);
    		header('Content-Type: ' . $content . '; charset=' . $GLOBALS['TL_CONFIG']['characterSet']);
    
    		// Send the cache headers
    		if ($expire !== null && ($GLOBALS['TL_CONFIG']['cacheMode'] == 'both' || $GLOBALS['TL_CONFIG']['cacheMode'] == 'browser'))
    		{
    			header('Cache-Control: public, max-age=' . ($expire - time()));
    			header('Expires: ' . gmdate('D, d M Y H:i:s', $expire) . ' GMT');
    			header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
    			header('Pragma: public');
    		}
    		else
    		{
    			header('Cache-Control: no-cache');
    			header('Cache-Control: pre-check=0, post-check=0', false);
    			header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    			header('Expires: Fri, 06 Jun 1975 15:10:00 GMT');
    			header('Pragma: no-cache');
    		}
    
    		echo $strBuffer;
    		exit;
    	}
    }
    
    
    /**
     * Instantiate the controller
     */
    $objIndex = new Index();
    $objIndex->run();
    
    ?>
    Ich danke Dir auf alle Fälle, dass Du dich meiner so schnell angenommen hast! Ich hab von php nicht so eine große Ahnung. Ich hab mir bisher alles selbst beigebracht.

    Es ist auch komisch, dass der Cache bei der Googlesuche meine Seite total kaputt ist. Das ist, seit ich die Version 2.11.4 installiert habe. Vorher war alles prima.
    Geändert von Limes (03.12.2012 um 12:37 Uhr)

  9. #9
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Code:
     
    # Fehlerseite für den 404 - Seite nicht gefunden
    ErrorDocument 404 /Mathe-Aufgaben-Nachhilfe/index.php
    Da ist der Knoten ... Leider weiß ich nicht wie deine Seite aufgebaut ist. "/Mathe-Aufgaben-Nachhilfe/index.php" gehört wohl nicht zu contao, oder? und wenn doch, wie ist der Pfad aus der Sicht von contao? Die dürfte dann nämlich nicht index.php heißen, sondern "irgendwie.html" in der standardeinstellung. Wobei "irgendwie" der Name der Seite ist die du ihr in contao gegeben hast.

    Ist Mathe-Aufgaben-Nachhilfe direkt im root? contao auch? Da ist irgendwo ein haken dran.


    Was siehst du wenn du in einem Browser http://www.mathiki.de/Mathe-Aufgaben...ilfe/index.php eingibst?
    Geändert von Toad (03.12.2012 um 12:42 Uhr)
    while(!asleep()) {sheep++;}

  10. #10
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Also, /Mathe-Aufgaben-Nachhilfe ist direkt im root. Dort ist auch die .htaccess und eine ganz primitive index.html.
    Im Ordner /Mathe-Aufgaben-Nachhilfe befindet sich das Verzeichnis /contao, /tl_files usw. und auch die index.php.

    Wenn ich deinen Link aufrufe, bekomme ich die Startseite von www.mathiki.de und keine Fehlermeldung.

    Gebe ich www.mathiki.de/index.php ein - Fehlermeldung und im Browser steht http://www.mathiki.de/Mathe-Aufgaben...tartseite.html

    Gebe ich www.mathiki.de/index.html ein - keine Fehlermeldung und im Browser steht www.mathiki.de/index.html
    Geändert von Limes (03.12.2012 um 12:54 Uhr)

  11. #11
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Konfiguration ist OK. Kann ja selbst testen ...

    Hast du im Startpunkt der Seite eine Sprache eingetragen? Und ein Fallback? Da scheint ein Fallback zu fehlen.
    Ansonsten kannst du das im Log auch getrost ignorieren. Das Wichtige funktioniert. Ich weiß auch nicht weiter.
    Vielleicht auch eine "unsichtbare Seite" im zusammenhang mit Vorschau und cache.

    Ausserdem muss ich zugeben, dass ich etwas "danebengelesen" habe. Arbeit halt ...
    while(!asleep()) {sheep++;}

  12. #12
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Ich dank dir erst mal für deine Zeit.

    Die Sprache ist de und der Sprachenfallback ist angehakt. Keine Ahnung warum die Meldungen kommen. Es ist eben nur blöd, dass ich keine eigene 404-Seite schreiben kann, weil ja dann immer bei Aufruf von www.mathiki.de auf diese Fehlerseite gesprungen wird. Vielleicht hat ja noch jemand anderes eine Idee.

    Wenn man sich alles (wie ich) im Selbststudium beibringt, ist das mit dem Fehler finden immer so eine Sache.
    Geändert von Limes (03.12.2012 um 13:21 Uhr)

  13. #13
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Du musst dann die Fehlerseite in der htaccess als 404 Seite eintragen. Da wo jetzt deine index.php steht. schieb dort doch mal eine einfache *.html hin und probiere es aus. Die muss dann in den letzten Zeilen deiner htaccess als 404 eingetragen sein. Da steht jetzt deine Startseite drin.

    Ich bin auch autodidaktisch unterwegs ... und weil das so ist, wuseln wir auch im Forum rum ...
    while(!asleep()) {sheep++;}

  14. #14
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Ich habe eine bla.html eingesetzt und die Weiterleitung in der 404-Seite rausgenommen. Außerdem in der .htaccess

    Code:
    ErrorDocument 404 /Mathe-Aufgaben-Nachhilfe/bla.html
    gesetzt. Nichts ist passiert bzw. er ist bei Aufruf von www.mathiki.de auf die Fehlerseite vom Contao gegangen. Im Browser stand immer noch www.mathiki.de (keine Weiterleitung auf /Mathe-Aufgaben-Nachhilfe) und wenn ich bei http://www.webconfs.com/redirect-check.php jetzt meine Webadresse getestet habe, kam eine Fehlermeldung, dass die Umleitung nicht funktioniert. Die bla.html hat er gar nicht angeguckt. Irgendwas muss mit der Weiterleitung nicht hinhauen. Nur durch die automatische Weiterleitung der 404-Seite auf die homeseite gaukelt er allen etwas vor. Keine Ahnung.

    Vielleicht können wir ja heut Abend noch einmal gemeinsam versuchen, dem Fehler auf den Grund zu gehen, dann kann ich ja die automatische Weiterleitung der 404-Seite bewusst ausschalten, damit Du siehst, wie die Seite wirklich reagiert. Ich muss jetzt erst mal ein paar Stunden arbeiten. Das Mathiki-Camp hat am Nachmittag vor Ort geöffnet.
    Geändert von Limes (03.12.2012 um 13:49 Uhr)

  15. #15
    Contao-Urgestein Avatar von do_while
    Registriert seit
    15.06.2009.
    Ort
    Berlin | Deutschland
    Beiträge
    3.614
    Partner-ID
    1081
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Alle *.html-Seiten werden erstmal in der htaccess umgeschrieben, dass sie als Aufruf-Parameter in die index.php einfliessen. Dort kümmert sich dann Contao darum und gibt, wenn nötig, die 404-Seite von Contao aus.

    Wenn Du andere Endungen als .html aufrufst, dann sollte auch die 404 des Servers angezeigt werden.

  16. #16
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Vielen Dank für deine Antwort. Das bringt mich aber nicht weiter.

    Niemand ruft eine Webseite mehr mit index.html auf. Jeder schreibt nur www.mathiki.de und schon bekomme ich diese Fehlermeldung:

    ID: 50179
    Datum: 2012-12-03 18:21
    Ursprung: Frontend
    Kategorie: ERROR
    Benutzer:
    Details: No active page for page ID "", host "www.mathiki.de" and languages "de, en" (http://www.mathiki.de/Mathe-Aufgaben-Nachhilfe//)
    Funktion: PageError404 generate()
    IP Adresse: 82.82.214.0
    Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11

    Woher kommt dieser doppelte Slash? Ich will diesen Fehler endlich loswerden.

  17. #17
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Erst Tochter, jetzt wieder hier.

    'n Abend.

    Mach erstmal die 404-Seite im contao aus.
    Ist nämlich doppelt gemoppelt. Vorteil der htaccess-Lösung, ist, dass wirklich alles abgefangen wird. Nicht nur .html, etc.
    Verhält sich dann alles noch genauso?


    Der doppelte slash ist genau so seltsam wie ID=""

    hast du Ordner-Urls an?
    while(!asleep()) {sheep++;}

  18. #18
    Contao-Urgestein Avatar von do_while
    Registriert seit
    15.06.2009.
    Ort
    Berlin | Deutschland
    Beiträge
    3.614
    Partner-ID
    1081
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Ich weiß ja nicht, ob Du gerade die Lösung gefunden hast, aber bei mir geht das jetzt.
    Win 7 Ulimate, Firefox 17.0.1

    www.mathiki.de führt auf http://www.mathiki.de/Mathe-Aufgaben...tartseite.html

  19. #19
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Wenn ich die Fehlerseite ausschalte, findet er meine Seite gar nicht mehr.

  20. #20
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    hallo do_while,

    das liegt daran, dass ich eine automatische Weiterleitung in der 404-Seite eingestellt habe. Ich habe gerade einmal die 404-Seite ausgeschalten. Nun findet er meine Seite gar nicht mehr.

    Es sei denn, ich gebe www.mathiki.de/index.html ein. Dann bekomme ich die Seite korrekt angezeigt - und sogar ohne Fehlermeldung. Und im Browser (Chrome V. 23) steht auch nur www.mathiki/index.html ( und keine Umleitung auf /Mathe-Aufgabe-Nachhilfe/startseite.html).

    Auch wenn ich die Seite so aufrufe: http://www.mathiki.de/Mathe-Aufgaben...ilfe/index.php erscheint die Seite korrekt ohne Fehlermeldung. Alles andere die übliche 404 Meldung.
    Geändert von Limes (03.12.2012 um 18:56 Uhr)

  21. #21
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Deine Konfiguration ist etwas schräg.

    Was ist denn für apache root? Das müsste das Verzeichnis mit der htaccess sein. Darin ist dann contao und daneben die mathe-... Ist root für deinen apachen vielleicht /contao?
    while(!asleep()) {sheep++;}

  22. #22
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Meine Seite liegt auf einem Stratoserver. Dort habe ich (für meine Begriffe das root) eine primitive index.html und die .htaccess und ein Verzeichnis /Mathiki-Aufgaben-Nachhilfe. In diesem Unterverzeichnis /Mathiki-Aufgaben-Nachhilfe befindet sich dann

    ausschnitt3.PNG

    mein gesamtes contao. Ich weiß, ich hab keine Ahnung. Hintergrund zu allem war, dass ich zwei Seiten parallel laufen bzw. eine ist aktuell und eine kann ich in Ruhe auf den neuesten Stand bringen, anschließend ändere ich die Verzeichnisnamen und die neueste Version ist zu sehen ohne großen Zeitverlust für die Leute draußen.

  23. #23
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Bei mir heißt es
    Code:
    ErrorDocument 404 /seitenichtgefunden404.html
    und das ist eine contao-Seite die so von aussen zu erreichen ist. Die existiert nicht wirklich.
    Bei mir ist das /contao auch root für den apachen. kann bei dir nicht so sein, da du mathe-... und contao nebeneinanbder hast. dann müsste es ../mathe ... in der 404-Anweisung heißen. Wenn Apache das überhaupt macht.

    Ohne, dass ich die Struktur kenne ist es schwierig.
    while(!asleep()) {sheep++;}

  24. #24
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Ahhh. Moment ...
    while(!asleep()) {sheep++;}

  25. #25
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Also, was brauchst du genau für Informationen?

    Ich hatte bis vor einigen Tagen die ErrorDocument Anweisung in der htaccess noch gar nicht drin. Ich glaube nicht, dass die damit was zu tun hat. Den Fehler gab es vorher auch schon.
    Geändert von Limes (03.12.2012 um 19:15 Uhr)

  26. #26
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Hast du schon.

    Was steht in deinem contao unter Einstellungen Globale Einstellungen Relativer Pfad zum Contao-Verzeichnis



    ?


    RewriteBase sieht eigentlich gut aus in deiner htaccess.

    Dein apache scheint root dann im mathe-... zu sehen.

    while(!asleep()) {sheep++;}

  27. #27
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Dort steht: /Mathe-Aufgaben-Nachhilfe

    Ich verstehe einfach nicht, warum die Seite ohne Fehler korrekt angegeben wird, wenn ich www.mathiki.de/index.html schreibe? (und komischerweise ohne Umleitung auf mathe-auf..../startseite.html)


    Ich habe vor ein paar Monaten mal versucht eine Domainumleitung über Strato direkt einzurichten. Habe es dann aber wieder rausgenommen, weil ich nicht mehr an mein Backend kam. Nun steht bei denen immer Umleitung (intern) /. Angeblich heißt das bei denen, dass die Umleitung wieder gelöscht wurde. Ich habe denen vorhin auch noch eine Mail geschrieben. Nicht dass das der besagte Slash ist, der da immer doppelt rumgeistert. Allerdings wird bis zu einer Antwort noch ne Menge Zeit vergehen.
    Geändert von Limes (03.12.2012 um 19:24 Uhr)

  28. #28
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177
    while(!asleep()) {sheep++;}

  29. #29
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Und das ist das Frontend: http://www.mathiki.de/Mathe-Aufgaben...ntao/index.php

    sollte aber nach dem rewrite http://www.mathiki.de/contao/index.php heißen.

    Der rewrite funkt. nicht. oder rewritebase
    while(!asleep()) {sheep++;}

  30. #30
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Stimmt, so gehts, es kommt auch keine Fehlermeldung. Doch die Leute geben nun mal www.mathiki.de ein und nicht Adresse mit der Umleitung. Auch google kennt mich nur unter www.mathiki.de. Wo liegt nur mein Denkfehler?

  31. #31
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Zitat Zitat von Toad Beitrag anzeigen
    Und das ist das Frontend: http://www.mathiki.de/Mathe-Aufgaben...ntao/index.php

    sollte aber nach dem rewrite http://www.mathiki.de/contao/index.php heißen.

    Der rewrite funkt. nicht. oder rewritebase
    Die obere Adresse bringt mich zum Backend, nicht zum Frontend und die zweite Adresse funktioniert nicht.

    Für das Frontend müsste stehen http://www.mathiki.de/Mathe-Aufgaben...ilfe/index.php
    Geändert von Limes (03.12.2012 um 19:32 Uhr)

  32. #32
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Kannst du mal bitte probeweise rewritebase / in deine htaccess schreiben?

    Sorry, ja, backend.
    while(!asleep()) {sheep++;}

  33. #33
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Alles wie gehabt. Dem juckt gar nicht, dass ich das rausgenommen habe.


    www.mathiki.de - page not found

    www.mathiki.de/index.html - seite gefunden

    http://www.mathiki.de/mathe-aufgaben...ilfe/index.php - seite gefunden.

    Woher weiß er dass denn? Ich habs doch rausgenommen?
    Geändert von Limes (03.12.2012 um 19:36 Uhr)

  34. #34
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    wenn du das
    Code:
    Redirect / /Mathe-Aufgaben-Nachhilfe
    in die htaccess schreibst, dann kannst du Mathe-Aufgaben-Nachhilfe in der url weglassen. bist also mit mathiki.de direkt dort wo du hinmusst.
    while(!asleep()) {sheep++;}

  35. #35
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Besser wäre es den apachen direkt mit
    Code:
    DocumentRoot "/srv/www/htdocs/Mathe-Nachhilfe-Aufgaben"
    direkt ins Verzeichnis mit contao zu biegen.

    Hast du ein Frontend bei strato? Plesk?
    while(!asleep()) {sheep++;}

  36. #36
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Ich habe es hinter

    RewriteBase /
    Redirect / /Mathe-Aufgaben-Nachhilfe

    gesetzt. Nun sieht mein Browsertitel so aus:

    http://www.mathiki.de/Mathe-Aufgaben...ilfeindex.html

    Ich bekomme einen 403 Fehler.

    Hab das RewriteBase / schon auskommentiert, hilft aber nicht wirklich.
    Geändert von Limes (03.12.2012 um 19:44 Uhr)

  37. #37
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    ???
    while(!asleep()) {sheep++;}

  38. #38
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Eigentlich gehört die contao-htaccess ins Verzeichnis wo contao drin ist. Und dann eine in dein root mit dem redirect.
    Ich hoffe du kommst noch klar ...

    Im Notfall hast du oben noch deine original-htaccess
    Geändert von Toad (03.12.2012 um 19:49 Uhr)
    while(!asleep()) {sheep++;}

  39. #39
    Contao-Nutzer Avatar von Limes
    Registriert seit
    03.12.2012.
    Beiträge
    31

    Standard

    Ich habe gerade folgendes in meine htaccess eingetragen:

    Code:
    <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-2.11.0
      #   RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely. 
      ##
      #RewriteBase /
      
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
      #RewriteCond %{HTTP_HOST} ^domain\.com [NC]
      #RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
      RewriteCond %{HTTP_HOST} ^mathiki\.de [NC]
      RewriteRule (.*) http://www.mathiki.de/$1 [R=301,L]
      Redirect permanent /index.php /Mathe-Aufgaben-Nachhilfe/index.php
    Und ich glaube, es funktioniert. Ich muss es noch mal genau testen.


    Ha, zu früh gefreut. jetzt kommt er zwar ohne fehler auf meine seite mit www.mathiki.de aber jetzt wird immer auf diese seite verlinkt, egal welchen menüpunkt ich auswähle. Ich werde es noch mal mit einer extra htaccess versuchen.
    Geändert von Limes (03.12.2012 um 19:54 Uhr)

  40. #40
    Contao-Nutzer Avatar von Toad
    Registriert seit
    18.02.2010.
    Ort
    NRW
    Beiträge
    177

    Standard

    Sieht gut aus. Probieren geht über studieren ... Schön.
    while(!asleep()) {sheep++;}

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
  •