Answer by NodeUnderflow for Apache: Return static string for location
A better solution is to use mod_lua. This also obviates the need for mod_rewrite (which the httpd docs discourage). See https://gist.github.com/james2doyle/f09b0e159bb30836e593 for an example.
View ArticleAnswer by MrWhite for Apache: Return static string for location
Further to @João Alves creative answer you can set the appropriate Content-Type and other custom headers by setting an environment variable on the RewriteRule and using the Header directive to set...
View ArticleAnswer by João Alves for Apache: Return static string for location
Yes it is kinda possible (in Apache 2.4).Just add the following directives:ErrorDocument 200 "{\"foo\": \"bar\"}"RewriteEngine OnRewriteRule "^/.well-known/foo$" - [R=200,L]Unfortunately it is (to my...
View ArticleAnswer by Andrew Schulman for Apache: Return static string for location
Instead of inserting the content directly in an Apache directive, you can put the content in a file and use an Alias:Alias /.well-known/foo /path/to/content.json<Location "/.well-known/foo">...
View ArticleApache: Return static string for location
For a .well-known path, I want to return a static JSON file/string.With nginx, this seems to be possible without creating that file by specifying the content in the configuration file:location...
View Article
More Pages to Explore .....