- VW4
- Rewrite Configuration
Return to current revision
General Differences
- changed the meta description
-
-
When installing VaultWiki for the first time, or upgrading to VaultWiki 4 from VaultWiki 3, or if you have made changes recently to Settings: Site Config, you may need to update your server's Rewrite configuration. If you are using default ... -
+
When installing VaultWiki for the first time, or upgrading to VaultWiki 4 from VaultWiki 3, or if you have made changes recently to Settings: Site Config, you may need to update your server's Rewrite configuration. If you are using default values for ...
-
Differences in Content
-
When installing VaultWiki for the first time, or upgrading to VaultWiki 4 from VaultWiki 3, or if you have made changes recently to [vw4]Settings: Site Config[/vw4], you may need to update your server's Rewrite configuration. If you are using default values for the following settings, you can skip this step:
[list][*]Filename of the Wiki PHP File
[*]Wiki URL Format[/list]
Depending on what kind of software your web server uses, the configuration will vary.
[h=3]Apache[/h]
Locate the [i]/.htaccess[/i] 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
# 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} !-f -
+# RewriteCond %{REQUEST_FILENAME} !-d
-
# RewriteRule ^(.*)?$ wiki_index.php [L,QSA][/code]
[h=3]NginX[/h]
Open your [i]/etc/nginx/nginx.conf[/i] 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]location /forums/ {
# for vBulletin, uncomment the following line
# if ($request_filename != /(?:admincp|clientscript|cpstyles|install|images|modcp|cron|vbseo|vault))
# for XenForo, uncomment the following line
# if ($request_filename != /(?:admin|data|install|js|styles|vault)
{
set $redirect_url $fastcgi_script_name;
rewrite ^ /forums/wiki_index.php last;
}
}[/code]
[template]Warning Box | Note | If you use vBSEO 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. You can pass URLs that VaultWiki fails to match to your catch-all script using the DEFAULT_SCRIPT directive in [i]/vault/config.php[/i].[/template]