Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

ich möchte die Anfragen auf einen virtuellen Ordner doku/datei.txt auf dem Apache umlenken auf file://server01/share/datei.txt.

Ich habe mir schon folgende Regel gebastelt.


RewriteRule ^/doku/(.*)$ file://server01/share/$1 [R,L]
[/code]

Wenn ich anstatt file http hinschreibe, dann wird im Browser die neue URL angezeigt. Dabei kann logischwerweise der Pfad nicht gefunden werden, da auf dem Fileserver kein Webserver läuft. Wenn ich es mit file probiere, dann kommt

http://webserver/file://server01/share/datei.txt'>http://webserver/file://server01/share/datei.txt in der Adresszeile. Das ist ja schon fast richtig nur das http://webserver davor stört noch. Was läuft daran falsch?

Frank

Wenn ich anstatt file http hinschreibe, dann wird im Browser die neue URL angezeigt. Dabei kann logischwerweise der Pfad nicht gefunden werden, da auf dem Fileserver kein Webserver läuft.

Die Condition macht doch überhaupt keinen Sinn, denn file:// lenkt den Zugriff auf die URL lokal um, d.h. wenn ich lokal den Pfad nicht im System haben, wird das nie funktionieren.

file URI scheme - Wikipedia, the free encyclopedia

On MS Windows systems, the normal colon (:) after a device letter has sometimes been replaced by a vertical bar (|) in file URLs. For example, to refer to file FOO.BAR in the top level directory of the C disk, the URL file:///C|/FOO.BAR was used. This reflected the original URL syntax, which made the colon a reserved character in a path part. For network shares, add an additional two slashes. For example, \\host\share\dir\file.txt, becomes file:////host/share/dir/file.txt.

Außerdem würde ich auch einmal behaupten, dass diese Condition nicht so funktionieren kann, denn damit würden Sicherheitlücken entstehen können.

  • Autor

Hallo,

Danke für den Tip. Ich habe es jetzt mit Redirect gelöst. Das mit der File URI kann ich leider nicht ändern. Es muss so sein. Und da der IE bei uns Unternehmensvorgabe ist, klappt es auch. Der Firefox sperrt sich allerdings dagegen. Aber das soll mich erstmal nicht weiter stören da wie gesagt der IE Standard ist.

Frank

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.