필자는 화제로 인해서 AuthForm을 통해 로그인 한 후 적절한 목적지로 사용자를 리디렉션하는 방법을 찾고 있습니다.AuthFormLoginLocation에서 로그인 한 후 이전 페이지로 리다이렉트 [Apache2 configuration]
그것은 외모는 그런 식으로 떨어지게한다 : 주소 표시 줄 요지에
사용자 입력이 domain.com/examplepage/something - 로그인 후> -> 서버가 그 (그게 전부가 잘 작동) domain.com/login.html 리디렉션 서버는 사용자가
탄원 도움 (그 밤은이 :(일)을 befor 주소 표시 줄에 입력 한 어떤 domain.com/examplepage/something하거나 그를 다시 리디렉션, 나를 당신의 아이디어 나
아래 준비 솔루션에 대해 알려 아파치 설정 (데비안에 설치된 아파치 v2.4.10 (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
당신은 도움을
감사합니다 :) 영어
죄송 자세한 정보가 필요하면 말해, 나는 그것을 한 적이 생각
내가 너무 이것에 대한 해결책을 모색하고있다. 나는 PHP로 할 수 있다는 것을 알고 있지만, 나는 로그인 페이지를 위해서만 PHP를 소개하는 것을 선호하지 않는다. 지금 당장 mod_rewrite가이 작업을 수행 할 수 있다고 생각합니다. 아직도 세부 사항을 모으고 있습니다. –