Mailing List Archive

More info
I'm a little closer to understanding what is going on with my absolute
failure to get MediaWiki to respect EasyDNS' domain forwarding. It
seems that they use frames. From their website:

This is accomplished by creating a frameset document which specifies an
invisible frame to keep the domain name in the location bar, and
another frame which occupies the whole screen which the page forwarded
to is placed. This has the effect of keeping the domain name in the
location bar, no matter what address is forwarded to within the frame.
If it doesn't matter to your application that the address shown in the
location bar of a visitors browser will always be the same, your domain
name, regardless of which page they access, then you can turn stealth
on and the only modification you have to make to the html code on your
site is that if you have links to other websites outside of your own
site, make sure your links look like this: <a
href="http://www.anothersite.com" target="_top">

Now, my problem isn't one of getting the outside links to work,
although that would be nice. (Movable Type seems able to support this.)
But rather, I think the .htaccess file I am using to clean up the
domain names is perhaps breaking the frame?

Also, I was able to figure something out:

This does not work:
RewriteCond %{REQIEST_URI} ^something.org
RewriteRule ^(.*) some.org$1

This does:
RewriteCond %{HTTP_HOST} ^wiki\.oxusnet\.net
RewriteRule ^(.*)$ http://wiki.oxus.net/$1 [L]

However, it creates an infinite loop for me, between the EasyDNS
forwarding and the redirect, so the page never, ever loads!

This may be hopeless, but if anyone has any ideas let me know! I
really, really, want to fix this!

kerim
Re: More info [ In reply to ]
P. Kerim friedman wrote:
> I'm a little closer to understanding what is going on with my absolute
> failure to get MediaWiki to respect EasyDNS' domain forwarding. It seems
> that they use frames. From their website:
[snip]
> Now, my problem isn't one of getting the outside links to work, although
> that would be nice. (Movable Type seems able to support this.) But
> rather, I think the .htaccess file I am using to clean up the domain
> names is perhaps breaking the frame?

MediaWiki includes an anti-framejacker defense shield. If you want to
take this out, open up stylesheets/wikibits.js and remove this:

// Un-trap us from framesets
if( window.top != window ) window.top.location = window.location;

-- brion vibber (brion @ pobox.com)
Re: More info [ In reply to ]
Brion,

Brilliant! But this only does half the job. The links within the wiki
don't respect the root URL I specified in LocalSettings.php, under
$wgServer, or the forwarded URL, but all still link to the actual host
URL. I don't know how to change these?

Also, is there some way to tell MediaWiki to change all links to
external sites to say target="_top"?

Thanks!

kerim

On Jul 31, 2004, at 6:23 PM, Brion Vibber wrote:

> P. Kerim friedman wrote:
>> I'm a little closer to understanding what is going on with my
>> absolute failure to get MediaWiki to respect EasyDNS' domain
>> forwarding. It seems that they use frames. From their website:
> [snip]
>> Now, my problem isn't one of getting the outside links to work,
>> although that would be nice. (Movable Type seems able to support
>> this.) But rather, I think the .htaccess file I am using to clean up
>> the domain names is perhaps breaking the frame?
>
> MediaWiki includes an anti-framejacker defense shield. If you want to
> take this out, open up stylesheets/wikibits.js and remove this:
>
> // Un-trap us from framesets
> if( window.top != window ) window.top.location = window.location;
>
> -- brion vibber (brion @ pobox.com)
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Re: More info [ In reply to ]
P. Kerim friedman wrote:
> Brilliant! But this only does half the job. The links within the wiki
> don't respect the root URL I specified in LocalSettings.php, under
> $wgServer, or the forwarded URL, but all still link to the actual host
> URL. I don't know how to change these?
>
> Also, is there some way to tell MediaWiki to change all links to
> external sites to say target="_top"?

You could try adding something like this to the HTML output:
<base target="_top" href="http://thefakeserver.com/" />

See:
http://www.w3.org/TR/html4/struct/links.html#h-12.4

-- brion vibber (brion @ pobox.com)
Re: More info [ In reply to ]
Brion,

Excellent! It seems to work. Note for others: I added the line to the
file "xhtml_slim.pt". I will try to write this all up for the MetaWiki
documentation sometime this week. But this part, in the end, just two
these two steps:

(1) Remove the following in stylesheets/wikibits.js

// Un-trap us from framesets
if( window.top != window ) window.top.location = window.location;

(2) Add the following to templates/xhtml_slim.pt (within the
<head></head> tags):

<base target="_top" href="http://thefakeserver.com/" />

Thanks everyone for your help, especially Alisson and Brion, and thanks
for putting up with like a 100 e-mails on my problem! Everything seems
to be working now!

Cheers,

kerim

On Aug 1, 2004, at 12:59 AM, Brion Vibber wrote:

> P. Kerim friedman wrote:
>> Brilliant! But this only does half the job. The links within the wiki
>> don't respect the root URL I specified in LocalSettings.php, under
>> $wgServer, or the forwarded URL, but all still link to the actual
>> host URL. I don't know how to change these?
> >
>> Also, is there some way to tell MediaWiki to change all links to
>> external sites to say target="_top"?
>
> You could try adding something like this to the HTML output:
> <base target="_top" href="http://thefakeserver.com/" />
>
> See:
> http://www.w3.org/TR/html4/struct/links.html#h-12.4
>
> -- brion vibber (brion @ pobox.com)
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Re: More info [ In reply to ]
Ooops, I spoke too soon! It seems that, while editing pages work,
submitting the results does not! After submitting I'm sent back to the
original edit page. The URL at the top looks like this:

http://wiki.oxus.net/Language_Policy?action=submit

kerim
Re: More info [ In reply to ]
Here is more info, with the hopes that someone can help me figure out
why things still aren't working:

It seems that the normal behavior of MediaWiki when editing a page is
to, first open this URL:

http://wiki.oxus.net/Main_Page?action=edit

Then this one:

http://wiki.oxus.net/Main_Page?action=submit

and then redirect to this one:

http://wiki.oxus.net/Main_Page

However, with the use of a frameset and URL forwarding, the action to
take the second URL, store the contents in the database, and redirect
tot he third URL is not working.

The question is, is this fixable? Or do I have to give up on using URL
forwarding with my website? It is very frustrating, as everything else
seems to be working fine with the URL forwarding. If there is some kind
of redirect, it seems I could perhaps avoid the problem by telling it
to go to: http://wiki.oxusnet.net/Main_Page?action=submit, or even to
http://wiki.oxusnet.net/Main_Page?action=edit in the first place, but
trying to do that manually doesn't help at all.

What kills the ability to save pages is the following alteration to
templates/xhtml_slim.pt (within the <head></head> tags):

<base target="_top" href="http://wiki.oxus.net/" />

Without this change, everything else works fine, but the URL at the top
of the screen always shows the first page someone clicked when coming
to the web site, rather than the URL of the current page. This is a
serious problem if I expect anyone to bookmark any of my pages. (This
is also why this is important to me, as the domain name will always be
the same, but the host name may change!). So, basically, I need some
other way to fix this problem, one that doesn't break the ability to
save pages. (I've removed that line from xhtml_slim.pt, in order to be
able to continue editing my site for now. If you access the site at
http://wiki.oxusnet.net/ everything works normally.)

(Note, the other two changes to my site are: (1) the addition of a
.htaccess file for URL beautification, and (2) the removal of the
anti-framesets line in stylesheets/wikibits.js.)

Thanks!

kerim