Discourse DB:Install log: Difference between revisions

From Discourse DB
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 20: Line 20:
   2. set $wgArticlePath = "/wiki/$1"; in LocalSettings.php
   2. set $wgArticlePath = "/wiki/$1"; in LocalSettings.php
   3. put a htaccess file with the following content in the dir for www.mysite.com
   3. put a htaccess file with the following content in the dir for www.mysite.com
 
<pre>
# close the php security hole...  
# close the php security hole...  
#  not actually needed but probably a good idea anyway
#  not actually needed but probably a good idea anyway
Line 35: Line 35:
# do the rewrite
# do the rewrite
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]
 
</pre>
Make sure Apache loads the Rewrite module. In httpd.conf this line must be added/uncommented:
Make sure Apache loads the Rewrite module. In httpd.conf this line must be added/uncommented:


LoadModule rewrite_module modules/mod_rewrite.so
LoadModule rewrite_module modules/mod_rewrite.so

Revision as of 17:16, August 11, 2006

We have the following extensions installed (with version numbers):

  • ParserFunctions
  • StringFuctions
  • SemanticMediawiki
  • inputbox.php


We are using rewrites to eliminate index.php from URLs. Instructions are here:

http://meta.wikimedia.org/wiki/Rewrite_Rules

The method we are suing is this:


Using a rewrite rule in a .htaccess file

This method may be useful if you have the ability to use rewrite rules in .htaccess and don't have conf access but it is more work for the httpd.

  1. install mediawiki in the dir for www.mysite.com/w as normal (using the installer)
  2. set $wgArticlePath = "/wiki/$1"; in LocalSettings.php
  3. put a htaccess file with the following content in the dir for www.mysite.com
# close the php security hole... 
#  not actually needed but probably a good idea anyway
php_flag register_globals off

# first, enable the processing - Unless your ISP has it enabled
# already.  That might cause weird errors.
RewriteEngine on

# uncomment this rule if you want Apache to redirect from www.mysite.com/ to
#  www.mysite.com/wiki/Main_Page
# RewriteRule ^/$ /wiki/Main_Page [R] 

# do the rewrite
RewriteRule ^wiki/?(.*)$ /w/index.php?title=$1 [L,QSA]

Make sure Apache loads the Rewrite module. In httpd.conf this line must be added/uncommented:

LoadModule rewrite_module modules/mod_rewrite.so