Merhaba,
Nginx üzerinde geliştirme yapmaya devam ediyorum. Tabi ki URL rewrite konusu Apache’ye göre biraz daha farklı işliyor.
Alıştığımız .htaccess maalesef nginx üzerinde yok. (Tabi ki include yaparak web root’a .htaccess koyabilirsiniz)
En son denememi SMF 2.0 ve Pretty URLs plugini ile gerçekleştirdim.
Eğer nginx üzerinde SMF çalıştırmak istiyorsanız, aşağıdaki rewrite rule’ları kullanabilirsiniz.
# Profil sayfalari icin rewrite ^/forum/profile/([^/]+)/?$ "/forum/index.php?pretty;action=profile;user=$1" last; # Actions icin rewrite ^/forum/(activate|admin|ads|announce|attachapprove|ban|boardrecount|buddy|calendar|clock)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(collapse|convertentities|coppa|credits|deletemsg|detailedversion|display|dlattach|editpoll|editpoll2)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(emailuser|featuresettings|findmember|groups|help|helpadmin|im|jseditor|jsmodify)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(jsoption|lock|lockvoting|login|login2|logout|manageboards|managecalendar|managesearch|manageattachments|maintain|markasread|mascot)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(membergroups|mergetopics|mlist|moderate|modifycat|modifykarma|movetopic|movetopic2|news|notify)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(notifyboard|optimizetables|openidreturn|packages|permissions|pm|post|postsettings|post2|printpage|profile|quotefast)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(quickmod|quickmod2|recent|regcenter|register|register2|reminder|removepoll|removetopic2)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(repairboards|reporttm|requestmembers|restoretopic|reports|search|search2|sendtopic|serversettings|smileys|smstats|suggest)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(spellcheck|splittopics|stats|sticky|theme|trackip|about:mozilla|about:unknown)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(unread|unreadreplies|verificationcode|viewErrorLog|viewmembers|viewprofile|vote|viewquery|viewsmfile|who)/?$ "/forum/index.php?pretty;action=$1" last; rewrite ^/forum/(\.xml|xmlhttp)/?$ "/forum/index.php?pretty;action=$1" last; # Forumlar icin rewrite ^/forum/([-_!~*'()$a-zA-Z0-9]+)/?$ "/forum/index.php?pretty;board=$1.0" last; rewrite ^/forum/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ "/forum/index.php?pretty;board=$1.$2" last; # Topicler icin rewrite ^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ "/forum/index.php?pretty;board=$1;topic=$2.0" last; rewrite ^/forum/([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ "/forum/index.php?pretty;board=$1;topic=$2.$3" last;