diff options
author | friendica <info@friendica.com> | 2012-12-25 16:57:48 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-25 16:57:48 -0800 |
commit | 2c958587001cde187e2202c7fe2a40bbe41875ca (patch) | |
tree | 15be5dd8fea12f8d30ded3223faadf15ef20a66c /mod | |
parent | ce0d38969614fbc1c7e3d9d54d974962a1014357 (diff) | |
download | volse-hubzilla-2c958587001cde187e2202c7fe2a40bbe41875ca.tar.gz volse-hubzilla-2c958587001cde187e2202c7fe2a40bbe41875ca.tar.bz2 volse-hubzilla-2c958587001cde187e2202c7fe2a40bbe41875ca.zip |
allow toplevel domain redirects for zot-info
Diffstat (limited to 'mod')
-rw-r--r-- | mod/zfinger.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index b51bf7900..6dcadb384 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -23,6 +23,17 @@ function zfinger_init(&$a) { } } + // allow re-written domains so bob@foo.example.com can provide an address of bob@example.com + // The top-level domain also needs to redirect .well-known/zot-info to the sub-domain with a 301 or 308 + + // TODO: Make 308 work in include/network.php for zot_fetch_url and zot_post_url + + if(($zaddr) && ($s = get_config('system','zotinfo_domainrewrite'))) { + $arr = explode('^',$s); + if(count($arr) == 2) + $zaddr = str_replace($arr[0],$arr[1],$zaddr); + } + $r = null; if(strlen($zhash)) { |