mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
01_FHEMWEB.pm: some help for fhemApp (Forum #119470)
git-svn-id: https://svn.fhem.de/fhem/trunk@23980 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3b3c62ad6f
commit
861def5d87
@ -195,6 +195,7 @@ FHEMWEB_Initialize($)
|
||||
plotWeekStartDay:0,1,2,3,4,5,6
|
||||
nrAxis
|
||||
redirectCmds:0,1
|
||||
redirectTo
|
||||
refresh
|
||||
reverseLogs:0,1
|
||||
roomIcons:textField-long
|
||||
@ -869,7 +870,8 @@ FW_answerCall($)
|
||||
$dir =~ s,www/,,g; # Want commandref.html to work from file://...
|
||||
|
||||
my $file = urlDecode($ofile); # 69164
|
||||
$file =~ s/\?.*//; # Remove timestamp of CSS reloader
|
||||
$file =~ s/[?#].*//; # Remove timestamp of CSS reloader
|
||||
$file = "index.html" if(defined($file) && $file eq ""); # 119470
|
||||
if($file =~ m/^(.*)\.([^.]*)$/) {
|
||||
$file = $1; $ext = $2;
|
||||
}
|
||||
@ -891,6 +893,12 @@ FW_answerCall($)
|
||||
return FW_serveSpecial("favicon", "ico", "$FW_icondir/default", 1);
|
||||
|
||||
} else {
|
||||
my $redirectTo = AttrVal($FW_wname, "redirectTo","");
|
||||
if($redirectTo) {
|
||||
Log3 $FW_wname, 1, "$FW_wname: redirecting $arg to $FW_ME/$redirectTo$arg";
|
||||
return FW_answerCall("$FW_ME/$redirectTo$arg")
|
||||
}
|
||||
|
||||
Log3 $FW_wname, 4, "$FW_wname: redirecting $arg to $FW_ME";
|
||||
TcpServer_WriteBlocking($me,
|
||||
"HTTP/1.1 302 Found\r\n".
|
||||
|
Loading…
x
Reference in New Issue
Block a user