Dir structure: /public_html/wiki is xinki.org.uk/wiki /public_html/labs is xinki.org.uk/labs (rewrites to xinki.org.uk/lab/$1) /public_html/cgsbwiki is xinki.org.uk/cgsbwiki (rewrites to xinki.org.uk/cgsb/$1) /public_html/st is what sweet-technology.co.uk maps to (set in add-on domain in cPanel)
The .htaccess in /public_html:
ErrorDocument 404 /notfound.php
AddHandler application/x-httpd-php5 .php .shtml
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.*) wiki/index.php?title=$1 [PT,L,QSA] RewriteRule ^lab/(.*) labs/index.php?title=$1 [PT,L,QSA] RewriteRule ^cgsb/(.*) cgsbwiki/index.php?title=$1 [PT,L,QSA]
RedirectMatch temp ^/learn$ http://moodle.xinki.org.uk
RedirectMatch permanent ^/wordpress$ http://blog.xinki.org.uk The LocalSettings.php in /st is:
<?php
# This file was automatically generated by the MediaWiki installer. # If you make manual changes, please keep track in case you need to # recreate them later. # # See includes/DefaultSettings.php for all configurable settings # and their default values, but don't forget to make changes in _this_ # file, not there.
# If you customize your file layout, set $IP to the directory that contains # the other MediaWiki files. It will be used as a base to locate files. if( defined( 'MW_INSTALL_PATH' ) ) { $IP = MW_INSTALL_PATH; } else { $IP = dirname( __FILE__ ); }
$path = array( $IP, "$IP/includes", "$IP/languages" ); set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
require_once( "includes/DefaultSettings.php" );
# If PHP's memory limit is very low, some operations may fail. # ini_set( 'memory_limit', '20M' );
if ( $wgCommandLineMode ) { if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) { die( "This script must be run from the command line\n" ); } } elseif ( empty( $wgNoOutputBuffer ) ) { ## Compress output if the browser supports it if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' ); }
$wgSitename = "Technopedia";
## The URL base path to the directory containing the wiki; ## defaults for all runtime URL paths are based off of this. $wgServer = "http://sweet-technology.co.uk"; $wgScriptPath = ""; $wgArticlePath = "/wiki";
## For more information on customizing the URLs please see: ## http://www.mediawiki.org/wiki/Manual:Short_URL
$wgEnableEmail = true; $wgEnableUserEmail = true;
$wgEmergencyContact = "webmaster@sweet-technology.co.uk"; $wgPasswordSender = "webmaster@sweet-technology.co.uk";
## For a detailed description of the following switches see ## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent ## There are many more options for fine tuning available see ## /includes/DefaultSettings.php ## UPO means: this is also a user preference option $wgEnotifUserTalk = false; # UPO $wgEnotifWatchlist = false; # UPO $wgEmailAuthentication = true;
{db settings removed}
# Schemas for Postgres $wgDBmwschema = "mediawiki"; $wgDBts2schema = "public";
# Experimental charset support for MySQL 4.1/5.0. $wgDBmysql5 = false;
## Shared memory settings $wgMainCacheType = CACHE_NONE; $wgMemCachedServers = array();
## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true; $wgUseImageResize = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert";
## If you want to use image uploads under safe mode, ## create the directories images/archive, images/thumb and ## images/temp, and make them all writable. Then uncomment ## this, if it's not already uncommented: # $wgHashedUploadDirectory = false;
## If you have the appropriate support software installed ## you can enable inline LaTeX equations: $wgUseTeX = false;
$wgLocalInterwiki = $wgSitename;
$wgLanguageCode = "en";
$wgProxyKey = "7d6e25c6a97122573ff1a1a762cb3442a8e64b01773a272d7e765a5b26fd3564";
## Default skin: you can change the default skin. Use the internal symbolic ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook': $wgDefaultSkin = 'monobook';
## For attaching licensing metadata to pages, and displaying an ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. $wgEnableCreativeCommonsRdf = true; $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright $wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html"; $wgRightsText = "GNU Free Documentation License 1.2"; $wgRightsIcon = "${wgScriptPath}/skins/common/images/gnu-fdl.png"; # $wgRightsCode = "gfdl"; # Not yet used
$wgDiff3 = "/usr/bin/diff3";
# When you make changes to this configuration file, this will make # sure that cached pages are cleared. $configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) ); $wgCacheEpoch = max( $wgCacheEpoch, $configdate );
?> I also put a .htaccess in /st: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.*) st/index.php?title=$1 [PT,L,QSA]
Hope you can help :)
On 15/04/07, Roger Chrisman roger@rogerchrisman.com wrote:
It's in the details. Present all your relevant details if you would like help with this. I host Wikigogy.org on a Cpanel "add on domain." It can be done. But you need to present your details for me to help you, eg LocalSettings.php, dir structure, .htaccess details details details. It's in the details.
http://www.mediawiki.org/wiki/Manual:Short_URL
Good luck!
Roger :-)
Gary Kirk wrote:
The wikis at /wiki and /labs both work correctly with short URLs and are set appropriately. My question is, how is it possible for the new wiki which is accessible at the add-on domain to be rewritten to /wiki? Or anything, but preferably that.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l