[Mediawiki-l] rewrite and Main_Page failure on IE

Gerard Braad (survion) g_braad at survion.com
Fri Nov 5 13:34:49 UTC 2004


Hello,


at the moment I'm trying to get rewriting to work. although, there seems
to be a problem.

when i open //domain.tld/wiki -> it rewrites to //domain.tld/wiki/
and therefore opens //domain.tld/wiki/Main_Page

when i open this site in Mozilla there is nothing wrong... everything
works. but when I try in IE, I get the Main_Page without any stylesheet.
for some reason it tries to resolve these from: /stylesheets/ instead of
/wiki/stylesheets/. when i change the page name to Main_Pag it does open
correctly with stylesheets from /wiki/stylesheets/

in mozilla the page reads:
Retrieved from "<a
href="http://home.survion.com/wiki/Main_Page">http://home.survion.com/wiki/Main_Page</a>"

in IE the same page reads:
Retrieved from "<a
href="http://home.survion.com//wiki/Main_Page">http://home.survion.com//wiki/Main_Page</a>"

acces.log output:
defiance - - [05/Nov/2004:14:07:49 +0100] "GET /wiki/Main_Page HTTP/1.1"
304 26
defiance - - [05/Nov/2004:14:07:52 +0100] "GET
/stylesheets/commonPrint.css HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:52 +0100] "GET
/stylesheets/monobook/main.css HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:52 +0100] "GET
/stylesheets/monobook/IEFixes.css HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:52 +0100] "GET /stylesheets/IEFixes.js
HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:54 +0100] "GET /stylesheets/wikibits.js
HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:54 +0100] "GET
/stylesheets/images/poweredby_mediawiki_88x31.png HTTP/1.1" 404 1182
defiance - - [05/Nov/2004:14:07:54 +0100] "GET /wiki/upload/wiki.png
HTTP/1.1" 304 -
defiance - - [05/Nov/2004:14:07:55 +0100] "GET /favicon.ico HTTP/1.1" 404 994


and when I try to open a different page in IE, it reads:
Retrieved from "<a
href="http://home.survion.com/wiki/Main_Pag">http://home.survion.com/wiki/Main_Pag</a>"

and the access.log output:
defiance - - [05/Nov/2004:13:50:08 +0100] "GET /wiki/Main_Pag HTTP/1.1"
200 1672
defiance - - [05/Nov/2004:13:50:11 +0100] "GET
/wiki/stylesheets/monobook/main.css HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:11 +0100] "GET
/wiki/stylesheets/commonPrint.css HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:11 +0100] "GET
/wiki/stylesheets/monobook/IEFixes.css HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:11 +0100] "GET
/wiki/stylesheets/IEFixes.js HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:11 +0100] "GET
/wiki/stylesheets/monobook/null?\"{ HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:12 +0100] "GET
/wiki/stylesheets/monobook/IE60Fixes.css HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:12 +0100] "GET
/wiki/stylesheets/wikibits.js HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:12 +0100] "GET
/wiki/stylesheets/monobook/bullet.gif HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:13 +0100] "GET
/wiki/stylesheets/monobook/user.gif HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:13 +0100] "GET
/wiki/stylesheets/images/wiki.png HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:13 +0100] "GET
/wiki/stylesheets/images/poweredby_mediawiki_88x31.png HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:14 +0100] "GET
/wiki/stylesheets/images/wiki.png HTTP/1.1" 304 -
defiance - - [05/Nov/2004:13:50:14 +0100] "GET /favicon.ico HTTP/1.1" 404 994


the following is in the vhost-domain.tld.conf (part of the full apache
httpd.conf):
<VirtualHost forum:80>
    php_flag                            register_globals off
    ServerName                          domain.tld
    ServerAlias                         www.domain.tld home.domain.tld
    ServerAdmin                         someone at domain.tld
    DocumentRoot                        /home/sites/domain.tld/home/web/
    RewriteEngine                       on
    RewriteLogLevel                     0
    #RewriteCond                        %{REQUEST_URI} !^/misc/.*
    #RewriteCond                        %{REQUEST_URI} !^/images/.*
    RewriteRule                         ^/site(.*)
/home/zope/zope.fcgi/VirtualHostBase/http/%{HTTP_HOST}:80/Sites/domain.tld/home/VirtualHostRoot/_vh_site/$1
[L]

    # rewrite to Main_Page
    #RewriteCond                                %{REQUEST_URI} ^/wiki$
    #RewriteRule                                ^/wiki(.*)
/wiki/index.php?tile=Main_Page [L]

    # no rewrite for subdirectories
    RewriteCond                         %{REQUEST_URI}
!^/wiki/(stylesheets|images|skins|upload)/
    RewriteCond                         %{REQUEST_URI}
!^/wiki/(redirect|texvc|index).php
    RewriteCond                         %{REQUEST_URI}
!^/wiki/error/(40(1|3|4)|500).html
    RewriteCond                         %{REQUEST_URI} !^/wiki/favicon.ico
    RewriteCond                         %{REQUEST_URI} !^/wiki/robots.txt

    # query string
    RewriteCond                         %{QUERY_STRING} ^$ [OR]
RewriteCond %{REQUEST_URI} ^/wiki/Special:Search

    # main rewrite rule
    RewriteRule                         ^/wiki/(.*) /wiki/index.php/$1 [L]

    RewriteLog                         
/home/sites/domain.tld/home/log/rewrite.log
    ErrorLog                           
/home/sites/domain.tld/home/log/error.log
    CustomLog                          
/home/sites/domain.tld/home/log/access.log common
</VirtualHost>


and this is in the LocalSettings.php from mediawiki:
$wgScriptPath       = "/wiki";
$wgScript           = "$wgScriptPath/";
$wgRedirectScript   = "redirect.php";
$wgArticlePath      = "$wgScript$1";
$wgStylePath        = "$wgScriptPath/stylesheets";
$wgStyleDirectory   = "$IP/stylesheets";
$wgLogo             = "$wgStylePath/images/wiki.png";
$wgUploadPath       = "$wgScriptPath/images";
$wgUploadDirectory  = "$IP/images";


does anyone have an idea of what might go wrong? this is a IE only matter
as it seems... any help would be appreciated.

greets,


Gerard


-- 
Gerard Braad - 'Smartass with attitude'
   http://gbraad.spotsnel.nl/
   mailto:g_braad at spotsnel.nl
   jabber:g_braad at spotsnel.nl
   telephone: +31 87 1901 799




More information about the MediaWiki-l mailing list