ejabberd-contrib/mod_http_redirect
Badlop 7ec5336a4a New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00
..
conf New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00
src New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00
COPYING New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00
README.md New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00
mod_http_redirect.spec New small module to redirect HTTP path to another location 2023-05-16 14:17:13 +02:00

README.md

mod_http_redirect - Redirect HTTP path to another URI

  • Author: Badlop

Description

This simple module redirects the web browser to the configured URI.

Configuration

The configurable option is:

  • location (default: [])

    The URI where requests will be redirected.

This module should be added not only to the modules section, also to request_handlers inside the listen option.

It is very important to set this request handler as the last one, otherwise it could produce infinite redirects.

listen:
  -
    port: 5280
    module: ejabberd_http
    request_handlers:
      /admin: ejabberd_admin
      /register: mod_register_web
      /: mod_http_redirect

modules:
  mod_http_redirect:
    location: http://example.com

With that configuration, a request for http://localhost:5280/ will be redirected to http://example.com