Nginx Default index page redirection -
Nginx Default index page redirection -
based on condition, instance, based on user-agent, determine default index page. within if condition, couldn't able utilize index keyword. should accomplish this? help appreciated.
updates
i able resolve this, default index index.htm
and rule
location /index.htm { if ($some_condition = true) { rewrite ^ /mindex.htm; } }
i don't know, whether right approach. please add together if problem has improve solution. in advance.
you can
if ($http_user_agent ~* (googlebot|bingbot)) { rewrite ^(.*)$ /index.html last; }
nginx
Comments
Post a Comment