Is there a 404 hook that triggers when a user tries to look up a page that doesnt exists in the database?
It should hopefully replace the page shownhttp://en.wikipedia.org/wiki/SomePageThatDoesn'tExists . - Hunter F.
On 24/12/11 00:41, Hunter Fernandes wrote:
Is there a 404 hook that triggers when a user tries to look up a page that doesnt exists in the database?
It should hopefully replace the page shownhttp://en.wikipedia.org/wiki/SomePageThatDoesn'tExists .
- Hunter F.
That text "Wikipedia does not have an article with this exact name. Please search..." is a message thay you can modify in the MediaWiki namespace. Why do you want to do?
Well, a site is being moved from a flat weebly layout (this_is_my_page.html) to a wiki style (This_is_my_page), and I wanted to, on every 404 page not found, check an internal conversion table ( this_is_my_page.html -> This_is_my_page ) and then 301 to that page. Is it possible? - Hunter F.
On Fri, Dec 23, 2011 at 5:31 PM, Platonides Platonides@gmail.com wrote:
On 24/12/11 00:41, Hunter Fernandes wrote:
Is there a 404 hook that triggers when a user tries to look up a page
that
doesnt exists in the database?
It should hopefully replace the page shownhttp://en.wikipedia.org/wiki/SomePageThatDoesn'tExists .
- Hunter F.
That text "Wikipedia does not have an article with this exact name. Please search..." is a message thay you can modify in the MediaWiki namespace. Why do you want to do?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hunter Fernandes h.g.fern@gmail.com wrote:
Well, a site is being moved from a flat weebly layout (this_is_my_page.html) to a wiki style (This_is_my_page), and I wanted to, on every 404 page not found, check an internal conversion table ( this_is_my_page.html -> This_is_my_page ) and then 301 to that page. Is it possible? [...]
Wouldn't it be easier to just dump the internal conversion table as .htaccess rewrites (or your server's equivalent)?
Tim
How much overhead is that? - Hunter F.
On Fri, Dec 23, 2011 at 9:59 PM, Tim Landscheidt tim@tim-landscheidt.dewrote:
Hunter Fernandes h.g.fern@gmail.com wrote:
Well, a site is being moved from a flat weebly layout (this_is_my_page.html) to a wiki style (This_is_my_page), and I wanted
to,
on every 404 page not found, check an internal conversion table ( this_is_my_page.html -> This_is_my_page ) and then 301 to that page. Is it possible? [...]
Wouldn't it be easier to just dump the internal conversion table as .htaccess rewrites (or your server's equivalent)?
Tim
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
How big is your conversion table? is it sufficient to just redirect all URLs that end with .html to remove the .html? (then you don't need a table)
IIRC, the traditional way on WMF wikis to do dynamic changes to the "no page here" page or redirects based on a pattern is with javascript. (e.g. in [[mediawiki:common.js]]) One use that I think existed once on some wiki was to do a search for the page name and redirect automatically if one existed with the same spelling but some letters in a different case. (DUMBO vs. Dumbo)
You could probably also do something with http://www.mediawiki.org/wiki/Manual:Hooks/ShowMissingArticle
-Jeremy
On Sat, Dec 24, 2011 at 01:01, Hunter Fernandes h.g.fern@gmail.com wrote:
How much overhead is that?
- Hunter F.
On Fri, Dec 23, 2011 at 9:59 PM, Tim Landscheidt tim@tim-landscheidt.dewrote:
Hunter Fernandes h.g.fern@gmail.com wrote:
Well, a site is being moved from a flat weebly layout (this_is_my_page.html) to a wiki style (This_is_my_page), and I wanted
to,
on every 404 page not found, check an internal conversion table ( this_is_my_page.html -> This_is_my_page ) and then 301 to that page. Is it possible? [...]
Wouldn't it be easier to just dump the internal conversion table as .htaccess rewrites (or your server's equivalent)?
Tim
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Sat, Dec 24, 2011 at 01:21, Jeremy Baron jeremy@tuxmachine.com wrote:
How big is your conversion table? is it sufficient to just redirect all URLs that end with .html to remove the .html? (then you don't need a table)
IIRC, the traditional way on WMF wikis to do dynamic changes to the "no page here" page or redirects based on a pattern is with javascript. (e.g. in [[mediawiki:common.js]]) One use that I think existed once on some wiki was to do a search for the page name and redirect automatically if one existed with the same spelling but some letters in a different case. (DUMBO vs. Dumbo)
You could probably also do something with http://www.mediawiki.org/wiki/Manual:Hooks/ShowMissingArticle
-Jeremy
See also http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritemap
-Jeremy
Hunter Fernandes h.g.fern@gmail.com wrote:
How much overhead is that? [...]
I don't know. Why not measure it and then report here?
Tim
What would be the correct way of measuring something like this?
On Sat, Dec 24, 2011 at 12:15 PM, Tim Landscheidt tim@tim-landscheidt.dewrote:
Hunter Fernandes h.g.fern@gmail.com wrote:
How much overhead is that? [...]
I don't know. Why not measure it and then report here?
Tim
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On 2011-12-23, at 22:01, Hunter Fernandes wrote:
On Fri, Dec 23, 2011 at 9:59 PM, Tim Landscheidt tim@tim-landscheidt.dewrote:
Wouldn't it be easier to just dump the internal conversion table as .htaccess rewrites (or your server's equivalent)?
How much overhead is that?
- Hunter F
Zero, or actually even negative. It takes longer for MediaWiki to start up and figure out the redirect than it does for your web server to do the job itself.
wikitech-l@lists.wikimedia.org