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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -