Nginx Config
☰ Table of Content
Some quick nginx config.
WordPress Permalink Redirect
Regex string must be put inside double quote.
/index.php/YYYY/MM/DD/<post> to /blog/<post>
|
|
/index.php/<post> to /blog/<post>
|
|
Ghost Permalink Redirect
This is mainly use to redirect Ghost permalink, which has no prefix, to Hugo format.
|
|
Multiple Domains Redirect
Redirect all traffic hitting nginx to <your domain>
. Not affect domain defined in other server block.
|
|
302
(temporary) is used instead of 301
(permanent) in case you want to use those domains in the future.
John Siu
Update: 2022-05-12