Hey Paul,
I installed MediaWiki in addition to my existing Joomla site and it worked great until I tried enabling MediaWiki shortURLs. I tried all sorts of different things and went over and over the examples at
http://www.mediawiki.org/wiki/Manual:Short_url and searched all over for someone with the same issue and never had any luck finding the answer. After hours of searching, reading Apache's docs on mod_rewrite, and trying a wide variety of things, I just couldn't figure out how to get the URLs properly added to the .htaccess file for Joomla and get it to play friendly.
I came across your site in the search results and since it was familiar, I figured this is a good place to post this and hopefully help others out as well if it can finally get solved. I found some help that partially fixed my issue, but not completely since the image files aren't properly linked. See what I mean at
http://myownserver.info/wiki/ with the logo.
Here's what my directory structure looks like:
Joomla is in my website's root directory along with the .htaccess file.
Mediawiki is in the sub-directory
w/.
Now here's my .htaccess file in the root folder:
Code: Select all
RewriteEngine On
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_URI} ^/wiki
# RewriteRule .* /index.php [L]
RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ /w/index.php [L,QSA]
RewriteRule ^wiki$ /w/index.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
I am pretty sure the issue is with there not being the following lines above the wiki/ rules, but I do not know how to fix it and I'm hoping you can help me out on this:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Thanks again and like I said, I REALLY hope this helps others out because nothing I found would work.