Jump to content

Rewriting Mediawiki Pages to a root folder


chopin2256

Recommended Posts

I have Mediawiki installed on my site.  I used mod rewrite to rewrite mediawiki pages to root, successfully.  So my pages look like this:

 

wiki.example.com/Page_Name

 

I still have one more problem though....but before I get into my problem, note these facts:

 

[*]The wiki files are physically located in /wiki/

[*]I am redirecting URLS successfully to root with this code:

 

RewriteRule ^(robots)\.txt - [L]
RewriteRule ^wiki/\.(php|html|gif|jpg|png|css|js)$ - [L]
RewriteRule ^[^:]*[./] - [L]
RewriteRule ^(.+)$ wiki/index.php?title=$1 [PT,L,QSA]

 

The top line of code negatively matches robots.txt

The second line negatively matches popular file extensions, allowing images to display in the browser etc.

The third line of code negatively matches directories (allowing css/skins/images to work)

The last line redirects pages to root.

 

Now to the problem:

 

Edit and history pages do not display correctly. When I click on edit for instance, this is the url that is displayed:

 

http://wiki.example.com/wiki/index.php?title=Page_Name&action=edit

 

Let's say I am editing a page called "Page_Name". Usually if there is text on the page, it will say "Editing Page_Name" and of course, I could edit. But instead, I get a page with no text in the edit box, and I get this in the title on the page "Editing Wiki/index.php"

 

Any assistance on this would be greatly appreciated.  Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.