trailing slash possible?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trailing slash possible?

Koen-2
I notice mediawiki creates some errors for the edit
and history of pages when I try to create urls with a
closing slash like this:

$wgArticlePath = "/wiki/$1/";

Also the article pages take a long time to load, which
isn't the case without the closing slash.

Any way to have this slash at the end of my urls and
still avoid mentioned problems?

thanks,
Koen

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: trailing slash possible?

Brion Vibber
Koen wrote:
> I notice mediawiki creates some errors for the edit
> and history of pages when I try to create urls with a
> closing slash like this:
>
> $wgArticlePath = "/wiki/$1/";
>
> Also the article pages take a long time to load, which
> isn't the case without the closing slash.

This will send you into an infinite redirect loop on every page load, since
you'll be trying to load eg "My Page/" instead of "My Page", but the canonical
URL for "My Page/" is "/wiki/My_Page//" which tries to load "My Page//" which
sends you to "/wiki/My_Page///" etc.

> Any way to have this slash at the end of my urls and
> still avoid mentioned problems?

Hack around a lot with rewrite rules or hacked up code.

-- brion vibber (brion @ pobox.com)


_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

signature.asc (257 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: trailing slash possible?

Koen-2
Hi brion,

According to your infinite loop scenario, "My_Page"
should try to load "My_Page/". But that doesn't seem
to happen.

Btw, what do you mean by canonical url?

Koen

--- Brion Vibber <[hidden email]> wrote:

> Koen wrote:
> > I notice mediawiki creates some errors for the
> edit
> > and history of pages when I try to create urls
> with a
> > closing slash like this:
> >
> > $wgArticlePath = "/wiki/$1/";
> >
> > Also the article pages take a long time to load,
> which
> > isn't the case without the closing slash.
>
> This will send you into an infinite redirect loop on
> every page load, since
> you'll be trying to load eg "My Page/" instead of
> "My Page", but the canonical
> URL for "My Page/" is "/wiki/My_Page//" which tries
> to load "My Page//" which
> sends you to "/wiki/My_Page///" etc.
>
> > Any way to have this slash at the end of my urls
> and
> > still avoid mentioned problems?
>
> Hack around a lot with rewrite rules or hacked up
> code.
>
> -- brion vibber (brion @ pobox.com)
>
> > _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
>
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l