Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Targeting homepage (not sub pages/dirs/) (1 reply)

$
0
0
What should I add to this directive to target also the home page (root of
the website, e.g. website.com)?
I already have 'index.php' in the directive but what if I visit
website.com(without /index.php)?

if ($request_uri ~*
"(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)")

I think I need to add another if, this time not with ~* though but with =
Something like

if ($request_uri = "(/)")

...?

Thanks in advance!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles