• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
      • Install/Upgrade
      • Admin Manual
      • User Manual
      • Style/Phrase Changes
      • Changelog
      • Security Issues
    • 
    • Wiki
    • Help
    • VaultWiki 4 Manual
    • Rewrite Configuration

    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.

    • Page
    • View
      • Source Code
      • History of Edits
    • English (US)

    1. VW4
    2. Rewrite Configuration

    This page is a chapter in VW4 Installing VaultWiki
    Rewrite rules allow a web server to take incoming requests to files and folders that may not physically exist on your server's file system and map them to scripts capable of handling those requests. With VaultWiki, you may need to update your server's Rewrite Configuration if:
    • You have installed VaultWiki for the first time
    • You have upgraded to VaultWiki 4 from VaultWiki 3
    • You have installed a catch-all script after installing VaultWiki
    • You have made changes recently to Settings: Site Config.
    If you don't have any catch-all rewrite rules in place, and you are using default values for the following Site Config settings, you can usually skip this step:
    • Filename of the Wiki PHP File
    • Wiki URL Format

    Note:The Filename you choose for the Wiki PHP File should not be the name of another existing file, unless it is 'wiki_index' itself. If you are using a non-default setting for the Wiki URL Format, the Filename should not be the name of an existing directory. If the selected Filename matches a location on your server that already exists, it simply cannot point to the wiki too.

    Depending on what kind of software your web server uses, the configuration will vary.

    Exclusions:No rewrite configuration is needed in the following cases:
    • You use XenForo, and Options > Search Engine Optimization (SEO) > Use Full Friendly URLs is enabled and working properly.


    Contents

    1. 1Apache
    2. 2NginX
    3. 3web.config
    4. 4Note on Catch-All Rules (like vBSEO)

    Apache

    Locate the /.htaccess file in your forum directory or create a new one.

    Add the following to the file:
    Code:
    RewriteEngine On
    RewriteBase /

    # If filename is not 'wiki_index', replace WIKI_FILE and uncomment the following line (skip this for XenForo)
    # 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 and replace WIKI_FILE below (skip this for XenForo)
    # RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_FILENAME} !-d
    # RewriteRule ^WIKI_FILE/?(.*)?$ wiki_index.php [L,QSA]

    NginX

    Open your /etc/nginx/nginx.conf file for editing, locate the server block for the domain where VaultWiki is installed, and add the following, where /forums/ is your forum directory:
    Code:
    # If filename is not 'wiki_index', replace WIKI_FILE and uncomment the following 3 lines (skip this for XenForo)

    #location ~ ^/forums/WIKI_FILE\.php$ {
    # rewrite ^ /forums/wiki_index.php;
    #}

    # If URL format is NOT /wiki/path, do NOT include this block
    location /forums/ {
    # for vBulletin, uncomment the following line
    # if ($request_filename !~ /(?:admincp|clientscript|cpstyles|install|images|modcp|cron|vbseo|vault)/)
    # for XenForo, skip the next 4 lines
    {
    set $redirect_url $fastcgi_script_name;
    rewrite ^ /forums/wiki_index.php last;
    }
    }

    web.config

    Open your web.config file for editing, and add the following:
    Code:
    <!-- VaultWiki rules start here -->
    <!-- VaultWiki uninstall: Remove all lines until the 'VaultWiki rules end here' line -->

    <!-- If filename is not 'wiki_index', replace WIKI_FILE and insert these lines -->
    <rule name="VaultWiki unfriendly" stopProcessing="true">
    <match url="^WIKI_FILE.php$" ignoreCase="false" />
    <action type="Rewrite" url="wiki_index.php" appendQueryString="true" />
    </rule>
    <!-- / VaultWiki unfriendly -->

    <!-- If URL format is /wiki/path or replaces a catch-all rule, insert these lines -->
    <rule name="VaultWiki friendly" stopProcessing="true">
    <match url="^(.*)?$" ignoreCase="false" />
    <conditions logicalGrouping="MatchAll">
    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
    </conditions>
    <action type="Rewrite" url="wiki_index.php" appendQueryString="true" />
    </rule>
    <!-- / VaultWiki friendly -->
    <!-- / VaultWiki rules end here -->

    Note on Catch-All Rules (like vBSEO)

    If you use vBSEO, dbSEO, or some other method of catch-all URL rewriting, keep in mind that VaultWiki's rewrite rules should super-cede and completely replace the rules for your existing solution.

    If you do not do this, your wiki will be inaccessible and you will just get a "Configuration Error" all the time.

    Using the vBSEO example, your .htaccess file might already contain something similar to the following:
    Code:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]

    This block should be completely commented out or removed, since VaultWiki accomplishes the same thing.

    Next you would locate a section that looks like this:
    Code:
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    Then, in the part of the line that ends like so:
    Code:
    |api\.php)

    you want to add more information right before the closing parenthesis. Usually, the following will be enough:
    Code:
    |wiki|yui


    Please consult the installation guide or customer support for your catch-all solution if you are unsure what lines are relevant, or if you don't use .htaccess files.

    Once the rules are updated, in order for vBSEO to continue doing its original job with these changed rules, you also need to modify vault/config.php. Find the line that defines VW_DEFAULT_SCRIPT, and change it to 'vbseo.php'
    VW4 Installing VaultWiki
    VW4 Running the VaultWiki Install Script 
    VW4 Securing VaultWiki Files 

    This page has been seen 3,595,903 times.

      • Created by
        pegasus
        • View Public Profile
        • Show contributions to this page
        • Send a private message to pegasus
        • Visit pegasus's homepage!
        on March 5, 2013
        Last updated by
        pegasus
        • View Public Profile
        • Show contributions to this page
        • Send a private message to pegasus
        • Visit pegasus's homepage!
        on June 19, 2017

    Users Browsing This Page (0 members, 1 guests)

    Search the Wiki

    Show results of these types:

    Share This Page

    Click a button below to activate it. Click again to share. Privacy Information Keep in mind that simply activating a button will reveal some of your browsing data with the selected third-party service in accordance with their own Terms of Service and/or Privacy Policy.
    Like0
    Link here from this web site
    Link here from the web
    Submit to Digg Digg
    Submit to del.icio.us del.icio.us
    Submit to StumbleUpon StumbleUpon
    Submit to Google Google

    Recent Activity

    Filters

    VW4 Install Manual

    Book Table of Contents
    • 1VW4 Installing VaultWiki
      1. 1.1VW4 Minimum Requirements
      2. 1.2VW4 Downloading the VaultWiki Package
      3. 1.3VW4 Uploading VaultWiki to Your Web Server
      4. 1.4VW4 Creating the Config File
        1. 1.4.1VW4 Config File Modifications for vBulletin
      5. 1.5VW4 Running the VaultWiki Install Script
      6. 1.6VW4 Rewrite Configuration
      7. 1.7VW4 Securing VaultWiki Files
      8. 1.8VW4 Creating your First Wiki Area
    • 2VW4 Upgrading VaultWiki
      1. 2.1VW4 Updating the VaultWiki Scripts on your Web Server
      2. 2.2VW4 Running the VaultWiki Upgrade Script
    • 3VW4 Uninstalling VaultWiki
    • 4VW4 Importing Data into VaultWiki
      1. 4.1VW4 Importing from Another VaultWiki 4
      2. 4.2VW4 Importing from MediaWiki
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 4:40 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.
    "Wiki" powered by VaultWiki v4.1.9.