Rewrite does not work

Reinis Rozitis r at
Thu Feb 28 22:13:59 UTC 2019

> I've added the following rewrite line in the Config website:
> rewrite ^tagged\/(.*)$ /?p=blog&blog_tag_name=$1 break;
> It is supposedly called by the following URL: /tagged/Server be redirected to the
> following internally: /blog?blog_name=&blog_tag_name=Server

If the rewrite directive in your config is exactly as written here, you are missing / after the ^ (as uri always starts with /) and you don't need to escape / so should be:

rewrite ^/tagged/(.*)$ /?p=blog&blog_tag_name=$1 break;


More information about the nginx mailing list