nginx rewrite rules for vBulletin 4.1.5+

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotted
    New Member
    • Feb 2006
    • 8
    • 4.0.x

    nginx rewrite rules for vBulletin 4.1.5+

    Code:
    location / {
    	try_files $uri $uri/ @rewrite;
    }
    location @rewrite {
    	# Forum
    	rewrite	/threads/.*				/showthread.php?$uri&$args      last;
    	rewrite	/forums/.*				/forumdisplay.php?$uri&$args    last;
    	rewrite	/members/.*				/member.php?$uri&$args          last;
    	rewrite	/blogs/.*				/blog.php?$uri&$args            last;
    	rewrite	/entries/.*				/entry.php?$uri&$args           last;
    
    	# MVC
    	rewrite	^/(?:(.*?)(?:/|$))(.*|$)$		/$1.php?r=$2                    last;
    }
    These are untested for CMS and Blog, but the rules have been copied from the included .htaccess and edited to work on nginx so I assume they work.
    Last edited by dotted; Sat 6 Aug '11, 2:59pm. Reason: typo
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...