mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-15 19:13:18 +00:00
Implement port based redirect
PUBLISHED_FROM=798a8bc38cb385027d3caae9b954002c1a10d39c
This commit is contained in:
1 parent
d8f8c1cb99
commit
7c4cda622f
3 files changed
+46
-1
No files matched your search
@@ -1772,6 +1772,13 @@ struct mg_serve_http_opts {
|
||||
* If uri_pattern starts with `@` symbol, then Mongoose compares it with the
|
||||
* HOST header of the request. If they are equal, Mongoose sets document root
|
||||
* to `file_or_directory_path`, implementing virtual hosts support.
|
||||
* Example: `@foo.com=/document/root/for/foo.com`
|
||||
*
|
||||
* If `uri_pattern` starts with `%` symbol, then Mongoose compares it with
|
||||
* the listening port. If they match, then Mongoose issues a 301 redirect.
|
||||
* For example, to redirect all HTTP requests to the
|
||||
* HTTPS port, do `%80=https://my.site.com`. Note that the request URI is
|
||||
* automatically appended to the redirect location.
|
||||
*/
|
||||
const char *url_rewrites;
|
||||
|
||||
|
||||
Reference in new issue
Block a user