I looked through about 50 posts in here to see if I could find anything but I'm still stuck. richardk, you're a rewrite machine!
I have a directory structure like this:
/httpdocs/.htaccess
/httpdocs/index.php
/httpdocs/mediawiki/
mediawiki not only accepts but USES two different URL formats depending on the link you click (stupid, right?)
Scenario 1:
Browser wants to see: subdomain.domain.com/mediawiki/index.php/Desired_Page
Would gets translated to:
subdomain.domain.com/index.php?wiki=Desired_Page
I have already gotten this to work with these rules:
- Code: Select all
RewriteRule ^mediawiki/index.php/(.+)$ index.php?wiki=$1 [R=301]
RewriteRule ^mediawiki/index.php/(.+)/$ index.php?wiki=$1 [R=301]
Scenario 2:
In mediawiki, if you click the edit button on a page, it uses a different URL format:
subdomain.domain.com/mediawiki/index.php?title=Desired_Page&action=edit
Which I need to translate to:
subdomain.domain.com/index.php?wiki=Desired_Page&action=edit
Scenario 2 is where I am having my troubles!
I must be able to handle /mediawiki/index.php?* formats.
I have tried these with no success:
- Code: Select all
RewriteRule ^mediawiki/index\.php\?title=(.+)$ index.php?wiki=$1 [R=301]
RewriteRule ^mediawiki/index.php?title=(.+)$ index.php?wiki=$1 [R=301]
The point of all of this is so I can include / render a mediawiki page within a div of another website.
Any assistance is greatly appreciated!
-Austin