Configuration instance for Nginx redirection
- 2020-05-06 12:14:14
- OfStack
In/usr local/nginx/conf/nginx conf:
server
{
...
##begin add by guozhenbin 20100727
location /b2c/
{
if (!-e $request_filename) {
rewrite ^/b2c/(.*)$ /b2c/index.php?$1 last;
}
}
##end add by guozhenbin 20100727
...
}
/usr/local/nginx/sbin/nginx -s reload
Restart is invalid.
b2c/, OK.
server
{
...
##begin add by guozhenbin 20100727
location /b2c/
{
if (!-e $request_filename) {
rewrite ^/b2c/(.*)$ /b2c/index.php?$1 last;
}
}
##end add by guozhenbin 20100727
...
}
/usr/local/nginx/sbin/nginx -s reload
Restart is invalid.
b2c/, OK.