• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Mod Rewrite Help

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Results 1 to 5 of 5

    Thread: Mod Rewrite Help

    • Thread Tools
      • Show Printable Version
    1. March 31, 2013 #1
      Elenna
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Elenna is offline
      Junior Member
      Join Date
      January 5, 2009
      Posts
      6
      Rep Power
      0

      Mod Rewrite Help

      Good evening!

      I was wondering if I could get a little help with my .htaccess file, trying to get the VaultWiki URL format changed (I would be fine with either of the non-default options).

      Here is my current .htaccess file - I am using vBulletin's suggested values for their own "friendly URLs", and I am not sure where to place the VaultWiki edits. At this point, it returns a 404 error, I'm not sure if the placement in the file makes a difference? I don't understand the mod rewrites very well, so thank you in advance for your patience!


      PHP Code:
      RewriteEngine on

      # If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
      RewriteBase /

      # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
      Options -MultiViews

      RewriteCond 
      %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d

      RewriteRule 
      ^.*$ - [NC,L]

      # Forum
      RewriteRule ^threads/.* showthread.php [QSA]
      RewriteRule ^forums/.* forumdisplay.php [QSA]
      RewriteRule ^members/.* member.php [QSA]
      RewriteRule ^blogs/.* blog.php [QSA]
      RewriteRule ^entries/.* entry.php [QSA]

      RewriteCond %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d

      RewriteRule 
      ^.*$ - [NC,L]

      # MVC
      RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]

      # Check MVC result
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule 
      ^(.*)$ - [NC,L]
      RewriteRule ^(.*)$ - [R=404,L]



      # VaultWiki from: https://www.vaultwiki.org/manual/vaultwiki-4-manual/vw4:rewrite-configuration

      # If filename is not 'wiki_index', replace WIKI_FILE and uncomment the following line
      # RewriteRule ^WIKI_FILE.php wiki_index.php [L,QSA]

      # If URL format is /wiki/path or replaces a catch-all rule, uncomment the following 3 lines
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond 
      %{REQUEST_FILENAME} !-d
      RewriteRule 
      ^(.*)?$ wiki_index.php [L,QSA] 
      This is with the new 4.0.0 Alpha 2. I've been a customer for years, and I love the new version, thank you guys for your work on it!!
      Reply With Quote Reply With Quote

    2. April 1, 2013 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      687
      Remove this line:
      Code:
      RewriteRule ^(.*)$ - [R=404,L]
      That was sending the script to 404 before it even reached the VaultWiki block. Since the earlier catch-all rule doesn't have the L (location) flag, I don't think we need to worry about the path being unreadable by VaultWiki, but if you find yourself getting 404s on existing wiki pages, then you may need to add this to the beginning of the VaultWiki rules too:
      Code:
      RewriteRule ^(.+)\.php\?r=(.*)$ $1/$2 [QSA]
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. April 2, 2013 #3
      Elenna
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Elenna is offline
      Junior Member
      Join Date
      January 5, 2009
      Posts
      6
      Rep Power
      0
      Thank you very much, that did the trick!!
      Reply With Quote Reply With Quote

    4. April 3, 2013 #4
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      687
      Did you need to do both changes or just the first one? I would like to update our manual on this subject so please let me know.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    5. April 4, 2013 #5
      Elenna
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      Elenna is offline
      Junior Member
      Join Date
      January 5, 2009
      Posts
      6
      Rep Power
      0
      I only removed the first code. I added the other line of code, but commented it out, just in case.

      Here is my full htaccess, in case it helps (I commented in a few things, which may not be helpful to others, but I like to remember where I got the code from!):

      PHP Code:
      RewriteEngine on

      # If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
      RewriteBase /

      # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
      Options -MultiViews

      RewriteCond 
      %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d

      RewriteRule 
      ^.*$ - [NC,L]

      # Forum
      RewriteRule ^threads/.* showthread.php [QSA]
      RewriteRule ^forums/.* forumdisplay.php [QSA]
      RewriteRule ^members/.* member.php [QSA]
      RewriteRule ^blogs/.* blog.php [QSA]
      RewriteRule ^entries/.* entry.php [QSA]

      RewriteCond %{REQUEST_FILENAME} -f [OR]
      RewriteCond %{REQUEST_FILENAME} -l [OR]
      RewriteCond %{REQUEST_FILENAME} -d

      RewriteRule 
      ^.*$ - [NC,L]

      # MVC
      RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]

      # Check MVC result
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule 
      ^(.*)$ - [NC,L]

      # Removed per https://www.vaultwiki.org/threads/5508/#post14909
      # RewriteRule ^(.*)$ - [R=404,L]



      # VaultWiki from: https://www.vaultwiki.org/manual/vaultwiki-4-manual/vw4:rewrite-configuration

      # If filename is not 'wiki_index', replace WIKI_FILE and uncomment the following line
      # RewriteRule ^WIKI_FILE.php wiki_index.php [L,QSA]

      # Per https://www.vaultwiki.org/threads/5508/#post14909
      # If getting 404 on existing wiki pages, uncomment this line:
      # RewriteRule ^(.+)\.php\?r=(.*)$ $1/$2 [QSA]

      # If URL format is /wiki/path or replaces a catch-all rule, uncomment the following 3 lines
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond 
      %{REQUEST_FILENAME} !-d
      RewriteRule 
      ^(.*)?$ wiki_index.php [L,QSA] 
      Reply With Quote Reply With Quote

    Similar Threads

    1. mod rewrite and special pages
      By cosy in forum VaultWiki Questions
      Replies: 1
      Last Post: December 7, 2011, 4:55 PM
    2. mod rewrite question
      By ashley76 in forum VaultWiki Questions
      Replies: 21
      Last Post: February 28, 2011, 11:30 PM
    3. nginx rewrite rules
      By SSSlippy in forum VaultWiki Questions
      Replies: 4
      Last Post: July 28, 2010, 9:30 PM

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 11:28 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.