Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: vBulletin 4 Nginx Rewrites for Mod Rewrite Friendly URLs - Complete Rewrite Rules

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default vBulletin 4 Nginx Rewrites for Mod Rewrite Friendly URLs - Complete Rewrite Rules

    We're running vBulletin 4 using nginx as our webserver. Getting this to work is pretty tough though, but here are the complete rewrite rules I'm using to make this site work.

    I modified them from https://forum.vbulletin.com/forum/vb...-friendly-urls | Archived Version (in case VBulletin Deletes Thread)

    The above guide was missing project, issue, and archive forum view specific entries.

    If you guys notice any links that do NOT work, please let me know so that I can correct and update these nginx rewrite rules.

    Code:
            location /forums {
                    try_files $uri $uri/ @rewrite;
    	}
    
            location @rewrite {
                # Forum
                rewrite /widget/config/.*   /forums/widget.php?r=config/$1&$query_string last;
                rewrite /content/?(.*)                   /forums/content.php?page$1           last;
                rewrite /showthread.php/.*             /forums/showthread.php?$uri&$args      last;
                rewrite /threads/.*                    /forums/showthread.php?$uri&$args      last;
                rewrite /forumdisplay.php/.*              /forums/forumdisplay.php?$uri&$args    last;
                rewrite /member.php/.*             /forums/member.php?$uri&$args          last;
                rewrite /members/.*                /forums/member.php?$uri&$args              last;
                rewrite /blogs/.*               /forums/blog.php?$uri&$args            last;
                rewrite /entries/.*             /forums/entry.php?$uri&$args           last;
                rewrite /list/.*                  /forums/list.php?$uri&args           last;
                rewrite /content.php/.*         /forums/content.php?$uri&$args                last;
    
                rewrite /forums/archive/index.php/t-([0-9]+)\.html /forums/archive/index.php?t-$1.html last;
                rewrite /forums/archive/index.php/f-([0-9]+)\.html /forums/archive/index.php?f-$1.html last;
    
                rewrite /forums/project/([0-9]+).* /forums/project.php?projectid=$1 last;
                
                rewrite /forums/issue/([0-9]+).* /forums/issue.php?issueid=$1 last;
    
                rewrite /forums/issuelist/([0-9]+).* /forums/issuelist.php?projectid=$1 last;
    
                rewrite /forums/.*              /forums/forumdisplay.php?$uri&$args    last;
                rewrite /content/.*             /content.php?$uri&$args                last;
                # MVC
                rewrite ^/(?:(.*?)(?:/|$))(.*|$)$       /$1.php?r=$2                    last;
            }
    Last edited by own3mall; January 29th, 2020 at 12:24 PM. Reason: Nginx Rewrites for Mod Rewrite Friendly URLs
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Thanks for fixing the links. I was losing my mind trying to figure out why they weren't working. :P

  3. #3

    Default

    So is nginx just to help keep the server more protected? Seems to be the answer I get when I google it. Curious is all, as I’ve been playing with a cloud server to just kind of understand how things work. Nothing fancy just trying to learn a little more ya know? Lol

  4. #4

    Default

    It's just better and more efficient. It can also handle many more simultaneous connections than apache2 in theory.
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  5. #5
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    own3mall, could you add a rewrite for these types as well?

    https://www.x-null.net/forums/issuelist.php?projectid=1&issuetypeid=feature

    I think it would be

    rewrite /forums/issuelist/([0-9]+).* /forums/issuelist.php?projectid=$1 last;

  6. #6

    Default

    Added. Is it working now?
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  7. #7
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Yes! Thank you!

  8. #8
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    the "full site" url in mobile view goes to https://www.x-null.net/forums/forums...php/?styleid=1 instead of https://www.x-null.net/forums/forums....php?styleid=1
    it adds an extra "/" before the query string.

  9. #9

    Default

    How do I reproduce that because everything I click on in mobile view is working fine?

    EDIT

    Oh, I found what you're talking about.
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  10. #10

    Default

    Fixed... problem was in the actual footer template itself.
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Las Vegas Nevada, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •