Configure discuz in Nginx! X3 pseudo-static, which can be implemented in the following three steps: Step 1. in the nginx configuration file, add: Sample Code: rewrite ^ ([^ \.] *)/topic -(. + )\. html $1/portal. php? Modtopictopic $2 last; rewrite ^ ([^ \.] *)/article -([
Nginx configurationDiscuz! X3 pseudo-static, which can be implemented in the following three steps. you can test it in person:
Step 1, inNginxIn the configuration file, add:
Sample code:
Rewrite ^ ([^ \.] *)/topic-(. +) \. html $1/portal. php? Mod = topic & topic = $2 last;
Rewrite ^ ([^ \.] *)/article-([0-9] +)-([0-9] + )\. html $1/portal. php? Mod = view & aid = $2 & page = $3 last;
Rewrite ^ ([^ \.] *)/forum-(\ w +)-([0-9] +) \. html $1/forum. php? Mod = forumdisplay & fid = $2 & page = $3 last;
Rewrite ^ ([^ \.] *)/thread-([0-9] +)-([0-9] +)-([0-9] + )\. html $1/forum. php? Mod = viewthread & tid = $2 & extra = page % 3D $4 & page = $3 last;
Rewrite ^ ([^ \.] *)/group-([0-9] +)-([0-9] + )\. html $1/forum. php? Mod = group & fid = $2 & page = $3 last;
Rewrite ^ ([^ \.] *)/space-(username | uid)-(. +) \. html $1/home. php? Mod = space & $2 = $3 last;
Rewrite ^ ([^ \.] *)/blog-([0-9] +)-([0-9] + )\. html $1/home. php? Mod = space & uid = $2 & do = blog & id = $3 last;
Rewrite ^ ([^ \.] *)/(fid | tid)-([0-9] +) \. html $1/index. php? Action = $2 & value = $3 last;
Rewrite ^ ([^ \.] *)/([a-z] + [a-z0-9 _] *)-([a-z0-9 _ \-] + )\. html $1/plugin. php? Id = $2: $3 last;
If (! -E $ request_filename ){
Return 404;
}
Step 2. log on to discuz! Go to the SEO settings page and select the check box in static URL.
Step 3. restart nginx to make the pseudo-static configuration take effect:
Service nginx restart