token Wrote: ------------------------------------------------------- > > Thanks for suggestion appa, i apply what said to > try and results in a "Redirection Loop". > > > Hello, > > > > I have found the following while searching it is > the only one i can > > get working with my config setup > > to send a 301 permanently if "/iby token - Nginx Mailing List - English
> Thanks for suggestion appa, i apply what said to try and results in a "Redirection Loop". > Hello, > > I have found the following while searching it is the only one i can > get working with my config setup > to send a 301 permanently if "/index.php" is directly accessed. > > > if ($request_uri ~* ^(/home(/index)?|/index(.php)?)/?$) > {by token - Nginx Mailing List - English
Thanks for suggestion appa, i apply what said to try and results in a "Redirection Loop". > Hello, > > I have found the following while searching it is the only one i can > get working with my config setup > to send a 301 permanently if "/index.php" is directly accessed. > > > if ($request_uri ~* ^(/home(/index)?|/index(.php)?)/?$) > { >by token - Nginx Mailing List - English
Hello, I have found the following while searching it is the only one i can get working with my config setup to send a 301 permanently if "/index.php" is directly accessed. if ($request_uri ~* ^(/home(/index)?|/index(.php)?)/?$) { rewrite ^(.*)$ / permanent; } GET http://www.example.com/index.php 301 Moved Permanently GET http://www.example.coby token - Nginx Mailing List - English
Thank you for clearing this up. Thanks Again Maxim! > Hello! > On Wed, Nov 23, 2011 at 05:30:46AM -0500, token wrote: > Hello, I would like to know if this is correct > > Will NGINX allways return the first of the provided hostname name in > from the `server_name` as beign the "SERVER_NAME", > > eg server_name hostname1 hostname2; > The $serverby token - Nginx Mailing List - English
Hello, I would like to know if this is correct Will NGINX allways return the first of the provided hostname name in from the `server_name` as beign the "SERVER_NAME", eg server_name hostname1 hostname2; I have two server blocks in this example server { listen 80; server_name www.example.co.uk *.example.co.uk; } the URI = http://something.example.co.uk/by token - Nginx Mailing List - English
Hi, António that is exactly wath is was trying to accomplish id didn't know i had to use the "~" at the beginning of the map key. Thank you >Do you mean that the request URI can contain both /pep and /sub?Like > this: > http://example.com/sub/pep/other-stuff-if-any > If so then your matching must be done with a regex: > map $uri $variable1 { > defaultby token - Nginx Mailing List - English
What i would like to do is like Apache is to use multiple map files and get the vars form them i have tried the following and can only get one value `$variable1` what is a rewrite to get `$variable1` and `$variable2` in one rewrite rewrite ^(^\/*)/(.*)$ /index.php?key1=$variable1&key2=$variable2 last; map $uri $variable1 { default 11; /sub 7; } map $uri $variable2 { defaultby token - Nginx Mailing List - English
Thanks for pointing that out. Locations it is then Thanks again Maxim!by token - Nginx Mailing List - English
Hello, which would be the best way to handle this multiple location blocks or a single location block with a regular exp. location /css/ { root /var/www/static_includes/; expires 97d; } location /images/ { root /var/www/static_includes/; expires 97d; } location /js/ { root /var/www/static_includes/; expires 97d;} ---------------- location ~ /(css|images|js)/ { rootby token - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |