| Silvia |
Geschrieben am: Mi 18.01.2006, 04:40
|
![]() AyomRank 2 ![]() ![]() ![]() ![]() Gruppe: Member (aktiv) Beiträge: 11 Mitglied seit: 26.03.2005 |
Alle Seiten, die eigentlich nicht mehr existieren werden im typo3 immer auf die Startseite weitergeleitet. Wir möchten, dass alles auf eine entsprechende Fehler url weitergeleitet wird.
Es lässt sich nicht über die .htaccess ändern, da erst einmal alle Dateinamen möglich sind. Diese Namen werden dann an die Extension AliasPro übergeben und entsprechend der Einträge in der Datenbank umgesetzt. Wir suchen jetzt im Code gerade die Stelle wo man einstellen kann was passieren soll wenn kein entsprechender Eintrag in der Datenbank gefunden wird, sprich ein 404 Error vorliegt. Zurzeit springt er da zur Startseite. Meiner Meinung nach funktioniert diese Extension in Verbindung mit dem Erweiterten Alias den wir einsetzen leider nicht, er arbeitet auch mit der .htaccess Einstellung Errordocument. Ich habe gestern auch schon versucht im typo3 faq was zu finden http://typo3.org/documentation/document-li...r_404_handling/ Auch das geht nicht, da ja mod_rewrite vorliegt. Wer kann helfen? -------------------- Grüsse aus Queensland, Australien
Silvia Spoerl http://www.www.aa-education.com http://www.neuseeland-neuseeland.com http://www.studyingaustralia.com |
![]() |
| René Weber rwx-support |
#2 Geschrieben am: Do 19.01.2006, 09:42 (+29:02)
|
![]() AyomRank 7 Gruppe: Moderatoren Beiträge: 1173 Mitglied seit: 3.09.2004 |
Hi Silvia,
Schön, dich auch wieder einmal hier zu sehen. Typo arbeitet mit einem Apache Server (ja, auch unter Windows). Da musst du folgendes tun: Check it out First off before you do anything else you should make sure that customising error codes in this way is allowed or even possible. Some webhosts (including most of the popular free ones I would imagine) will not permit this sort of tampering because it might mess something else important up. This is generally thought of as an “advanced” modification. Find an FAQ or email the people in charge of your server and ask if you can set it up. If you have your own domain, you shouldn’t have any restrictions of this kind. The .htaccess file This is the special file that sets up the deal for you. It can contain all sorts of directives for the Apache server. If you’re not using an Apache-based server, you’ll have to read your server’s manual on how to do it. Look in your root directory, the place where your homepage is, for this file (.htaccess). If it's not there don't fret, you can just create it afresh and it won't make any difference. When doing so, just make an empty text file in Notepad or whatever, and make sure you start the filename with a dot — it's vital. This means that it is no longer a text file — the file suffix will be .htaccess, so it doesn't have a filename of its own. sourcetip: You may have problems creating a filename that starts with a dot. If your operating system won’t let you, rename the file through your FTP program once it's online. A filename starting with a dot is how files are hidden in Unix. Edit it Now you need to point this file to your custom page. Add this line to the .htaccess file (edit it with a text editor like Notepad): ErrorDocument 404 http://www.example.com/404page.html Make sure it's all on one line, and change that address to the full address of your newly created page. You can also give the address of the 404 page without your domain name. Simply start it with a slash, which tells the server to start looking in your root directory (where your homepage is), and follow the path you specify. For example, ErrorDocument 404 /misc/404page.html This will load the file 404page.html in your misc directory. Now upload your .htaccess file to your root directory, and your 404 page to the address you specified, and you’re ready. Then let’s turn it on! This step may not be necessary, but if you’re unlucky you’ll have to tell your server to activate this feature. On a UNIX server, this may already be on, but if not you’ll have to telnet into your server and type chmod 644 .htaccess at the prompt. You can do this through the interface in most FTP programs too. This sets the file permissions. If you have no idea what that meant, contact your server guys again and ask them to sort it out for you. What should I use it for? A good 404 error page must have a number of things to be truly useful — it’s not much good simply putting up a message saying “we apologise for messing up so very horribly.” Your 404 page should look similar to the rest of your website, so that visitors know that they’re still on part of your site. Explain the error that has occured, and perhaps describe common reasons for the error (mistyped URLs, outdated content etc.). Use clear language and don’t ramble. Since it’s such a well-known error code, including the number “404” in this summary will get the message across quickly. If your site has a search function, include a search box. If you have an index, add a link to it, and definitely link back to your homepage. Include an email link so that visitors can report the problem. Don’t expect a lot of them to take the time to do it, but some will, and it again enforces the point that you care that they’ve had a problem. Overall, just make sure you motivate your reader not to lose all faith in your site, and give them options as to where to go next. sourcetip: Since your 404 page might be served up from any subdirectory of your site, make sure all links and image sources are defined absolutely. For instance, use href="/index.html" instead of href="../../index.html". Even if you don’t allow many links to go broken throughout your own site, mistakes will occur. Visitors will mistype an address, or follow a mistyped link from another site. Studies have shown that if you recover well from an error by serving a useful error page, visitors are actually happier with their experience with a website than they would’ve been if nothing went wrong. Don’t ask me how exactly that works, but I saw it in a book, so there you go. sourcetip: Internet Explorer has a lightly-documented “feature” that stops it from serving any custom 404 error page that is less than 512 bytes long. Your visitors will instead be sent to IE’s own 404 page (screenshot), which is generic and suggests they use an MSN search to “look for information on the Internet.” That’s one way to lose visitors! Make sure your custom 404 error page is over this limit — about 10 full lines of text and HTML should be enough. -------------------------------------------------------------------------------- To test your work, try getting to a page you know doesn't exist and seeing if your error page comes up. Good luck. Cheers René -------------------- |
![]() |
| Silvia |
#3 Geschrieben am: Do 19.01.2006, 22:44 (+13:02)
|
![]() AyomRank 2 ![]() ![]() ![]() ![]() Gruppe: Member (aktiv) Beiträge: 11 Mitglied seit: 26.03.2005 |
Hallo Rene,
Danke nochmal für Deinen Feedback. Leider hat das nichts mit .htaccess zu tun, da alle Seite egal ob sie existieren oder nicht an das CMS (typo3) weitergeleitet werden. Es gibt also keine Seiten die nicht existieren. Das ganze wird durch folgenden Eintrag in der .htaccess erledigt: RewriteEngine on RewriteRule ^(fileadmin|media|misc|t3lib|tslib|typo3|typo3conf|typo3temp|uploads)/ %{REQUEST_FILENAME} [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php Das wird benötigt um die Extension AliasPro überhaupt nutzen zu können. Ich brauche eine Lösung die die Extension AliasPro betrifft bzw. den Typo3 Core. Ich glaube aber nicht, dass wir in irgendeinem Forum dazu wirklich Auskunft erhalten. Dieses Problem ist einfach zu speziell. Oder hast Du eine Idee? -------------------- Grüsse aus Queensland, Australien
Silvia Spoerl http://www.www.aa-education.com http://www.neuseeland-neuseeland.com http://www.studyingaustralia.com |
![]() |
| Sascha Ahlers |
#4 Geschrieben am: Do 19.01.2006, 22:53 (+00:08)
|
||
![]() AyomRank 8 Gruppe: Experten Entwicklung Beiträge: 1708 Mitglied seit: 27.12.2004 |
Hallo Silvia, einfach die letzen beiden Zeilen auskommentieren, ich vermute die letzen beiden Zeilen sind hauptsächlich für das Problem verantwortlich. Die vorherige Regel könnte man noch herausnehmen, wenn man dies möchte, kann auch gleich alles auskommentiert werden. Vorausgesetzt die "RewriteEngine" muss nicht noch explizit für anderen Regeln angeschaltet werden. Beispiel:
MfG Sascha Ahlers -------------------- Joseph Joubert: "Der Verstand kann uns sagen, was wir unterlassen sollen. - Aber das Herz kann uns sagen, was wir tun müssen."
Sicherheit beim Programmieren: Top 10 application vulnerabilities in 2007 |
||
![]() |
| Silvia |
#5 Geschrieben am: Do 19.01.2006, 23:32 (+00:38)
|
![]() AyomRank 2 ![]() ![]() ![]() ![]() Gruppe: Member (aktiv) Beiträge: 11 Mitglied seit: 26.03.2005 |
Hallo Sascha,
Leider passiert gar nichts, keine Aenderung. Mache ich etwas falsch? -------------------- Grüsse aus Queensland, Australien
Silvia Spoerl http://www.www.aa-education.com http://www.neuseeland-neuseeland.com http://www.studyingaustralia.com |
![]() |
| Sascha Ahlers |
#6 Geschrieben am: Fr 20.01.2006, 00:19 (+00:47)
|
||||
![]() AyomRank 8 Gruppe: Experten Entwicklung Beiträge: 1708 Mitglied seit: 27.12.2004 |
Hmm, was wurde den nun verändert? Und was bedeutet "es passiert gar nichts"? Ist das die komplette .htaccess Datei? - Wenn ja, kann der Code vermutlich ganz weichen und stattdessen müssen halt die Fehlerdokumente eingetragen werden:
MfG Sascha Ahlers Bearbeitet von Sascha Ahlers am Fr 20.01.2006, 00:23 -------------------- Joseph Joubert: "Der Verstand kann uns sagen, was wir unterlassen sollen. - Aber das Herz kann uns sagen, was wir tun müssen."
Sicherheit beim Programmieren: Top 10 application vulnerabilities in 2007 |
||||
![]() |
Thema wird von 0 Benutzer(n) gelesen (0 Gäste und 0 anonyme Benutzer)
0 Mitglieder:
Trackback-Url: http://www.ayom.com/track/t/10194
![]() |
![]() ![]() ![]() |
| Themen Titel | Autor | Views | Antworten | Letzte Aktion |
| Einbinden vonn RSS feeds in Typo3 / MYSQL | e-card | 11451 | 5 | Di 4.11.2008, 18:36 |
| mod_rewrite Frage | Coach | 345 | 8 | Di 21.10.2008, 08:01 |
| Typo3 Suche- / Verzeichnisdienst | Martin H | 291 | 6 | Do 12.06.2008, 14:42 |
| Internal Server Error ? | japsa | 254 | 6 | Mi 28.05.2008, 11:59 |
| Unsichtbare Weiterleitung auf Typo3-Seiten | Lissy | 1193 | 3 | Fr 18.04.2008, 01:27 |
| Typo3 Projekt zu vergeben | lotto | 230 | 0 | Mi 9.04.2008, 10:00 |
| Error-Reporting | cr4m0 | 317 | 9 | Di 25.03.2008, 15:09 |
| mod_rewrite & verzeichnisse | pangu | 237 | 1 | So 23.03.2008, 11:53 |
| TYPO3 Installation | LindaXtra | 318 | 4 | Sa 22.03.2008, 11:30 |
Anzeige - [Hier werben / Mediadaten]


















