[MediaWiki-l] Rewrite Rules

Steve VanSlyck s.vanslyck at spamcop.net
Sun Jan 13 01:44:45 UTC 2013


OK,

That's working great - thanks Mark! Can this be adjusted so that calls 
to http:mysite.com redirect to http://_www_.mysite.com?


On 1/12/2013 20.17, Mark A. Hershberger wrote:
> On 01/12/2013 08:03 PM, Steve VanSlyck wrote:
>
>> # Short url for wiki pages(dunno if [PT,L] is required instead)
>> RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/wiki/index.php [L]
>> # Redirect / to Main Page(dunno if [PT,L] is required instead)
>> RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]
> %{DOCUMENT_ROOT} is wrong there.
>
> Try replacing those lines with this:
>
>    RewriteCond %{REQUEST_FILENAME} !-f
>    RewriteRule ^/?wiki/(.*)$ /wiki/index.php?title=$1 [L,QSA]
>    RewriteRule ^/*$ /wiki/Main_Page [L,QSA]
>
> HTH,
>
> Mark.
>



More information about the MediaWiki-l mailing list