Wie ich im Thema geschrieben, bin ich auf der Suche nach einer Möglichkeit, Benutzer nach der Anmeldung über AuthForm zum richtigen Ziel umleiten.Umleiten auf die vorherige Seite nach dem Login von AuthFormLoginLocation [Apache2 Konfiguration]
Es sollte Blicke smth wie folgt aus:
Benutzer die Eingabe in die Adressleiste addres domain.com/examplepage/something -> Server leitet ihn (Das ist gut funktioniert) domain.com/login.html -> Nach dem Login Server leitet ihn zurück zu domain.com/examplepage/something oder was auch immer der Benutzer (das ist nicht funktioniert :()
Pleas helfen, lassen Sie mich über Ihre Idee oder fertige Lösung
Below wissen Adresse bar vor dem getippt hatte Apache-Konfiguration (Apache v2.4.10 auf Debian installiert (Raspbian - Jessie)
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/html">
AuthFormProvider file
AuthType form
AuthName "Reserved Area"
AuthFormLoginRequiredLocation /login.html
Session On
SessionCookieName session path=/
require valid-user
AuthUserFile /etc/apache2/.htpasswd
</Directory>
<Location "/login.html">
Order allow,deny
Allow from all
Require all granted
</Location>
Alias /open/ "/var/www/open/"
<Directory "/var/www/open/">
Order allow,deny
Allow from all
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Sag mir, wenn Sie mehr Informationen benötigen
Vielen Dank für Hilfe :)
Sorry für Englisch; p
Auch ich bin eine Lösung dafür zu suchen. Ich weiß, dass es in PHP gemacht werden kann, aber ich möchte PHP nicht nur für eine Login-Seite einführen. Momentan denke ich, dass vielleicht mod_rewrite dies tun kann. Noch die Details zusammenstellen. –