4 ms·
Quick question for any nginx experts: the following config setting: set $push_channel_id $arg_id; #/?id=239aff3 or somesuch Means that the ?id= querystring pa
by simonw 17y ago
Quick question for any nginx experts: the following config setting:
set $push_channel_id $arg_id; #/?id=239aff3 or somesuch
Means that the ?id= querystring paramater is used as the push channel ID. Any idea if it would be possible to set it up so /channel/12345/ would result in 12345 being set as the push channel ID?
- wizard_2 17y agoQuite possible - You'd need to use the rewrite module to pass it as an argument. http://wiki.nginx.org/NginxHttpRewriteModule http://wiki.nginx.org/NginxHttpRewriteModule Maybe something like this... location / { rewrite ^/channel/(.+)$ /channel/?id=$1 last; } location /channel/{ #stuff set $push_channel_id $arg_id; #/?id=239aff3 or somesuch }