Loading...
 
Skip to main content

History: TikiWikiRewriteRule

Preview of version: 12

here is the rewrite activated on tikiwiki.org (08-17-2003)

  RewriteEngine On

  # direct one-word access
  RewriteRule ^articles$             /tiki-view_articles.php                   [L]
  RewriteRule ^blogs$                /tiki-list_blogs.php                      [L]
  RewriteRule ^categories$           /tiki-browse_categories.php               [L]
  RewriteRule ^charts$               /tiki-list_charts.php                     [L]
  RewriteRule ^chat$                 /tiki-chat.php                            [L]
  RewriteRule ^contact$              /tiki-contact.php                         [L]
  RewriteRule ^directories$          /tiki-directory_browse.php                [L]
  RewriteRule ^eph$                  /tiki-eph.php                             [L]
  RewriteRule ^faqs$                 /tiki-list_faqs.php                       [L]
  RewriteRule ^files$                /tiki-file_galleries.php                  [L]
  RewriteRule ^forums$               /tiki-forums.php                          [L]
  RewriteRule ^images$               /tiki-galleries.php                       [L]
  RewriteRule ^galleries$            /tiki-galleries.php                       [L]
  RewriteRule ^games$                /tiki-list_games.php                      [L]
  RewriteRule ^my$                   /tiki-my_tiki.php                         [L]
  RewriteRule ^newsletters$          /tiki-newsletters.php                     [L]
  RewriteRule ^quizzes$              /tiki-list_quizzes.php                    [L]
  RewriteRule ^stats$                /tiki-stats.php                           [L]
  RewriteRule ^surveys$              /tiki-list_surveys.php                    [L]
  RewriteRule ^trackers$             /tiki-list_trackers.php                   [L]
  RewriteRule ^irc$                  /tiki-irc_logs.php                        [L]
  RewriteRule ^mobile$               /tiki-mobile.php                          [L]
  RewriteRule ^wml$                  /tiki-mobile.php                          [L]
  # access any object by its numeric identifier
  RewriteRule ^article([0-9]+)       /tiki-read_article.php?articleId=$1       [QSA,L]
  RewriteRule ^art([0-9]+)           /tiki-read_article.php?articleId=$1       [QSA,L]
  RewriteRule ^cat([0-9]+)           /tiki-browse_categories.php?parentId=$1   [QSA,L]
  RewriteRule ^blog([0-9]+)          /tiki-view_blog.php?blogId=$1             [QSA,L]
  RewriteRule ^chart([0-9]+)         /tiki-view_chart.php?chartId=$1           [QSA,L]
  RewriteRule ^directory([0-9]+)     /tiki-directory_browse.php?parent=$1      [QSA,L]
  RewriteRule ^eph([0-9]+)           /tiki-directory_browse.php?parent=$1      [QSA,L]
  RewriteRule ^faq([0-9]+)           /tiki-view_faq.php?faqId=$1               [QSA,L]
  RewriteRule ^file([0-9]+)          /tiki-list_file_gallery.php?galleryId=$1  [QSA,L]
  RewriteRule ^dl([0-9]+)            /tiki-download_file.php?fileId=$1         [QSA,L]
  RewriteRule ^forum([0-9]+)         /tiki-view_forum.php?forumId=$1           [QSA,L]
  RewriteRule ^image([0-9]+)         /tiki-browse_gallery.php?galleryId=$1     [QSA,L]
  RewriteRule ^gallery([0-9]+)       /tiki-browse_gallery.php?galleryId=$1     [QSA,L]
  RewriteRule ^newsletter([0-9]+)    /tiki-newsletters.php?nlId=$1             [QSA,L]
  RewriteRule ^quiz([0-9]+)          /tiki-take_quiz.php?quizId=$1             [QSA,L]
  RewriteRule ^survey([0-9]+)        /tiki-take_survey.php?surveyId=$1         [QSA,L]
  RewriteRule ^tracker([0-9]+)       /tiki-view_tracker.php?trackerId=$1       [QSA,L]
  RewriteRule ^wiki-([A-Za-z0-9]+)   /tiki-index.php?page=$1                   [QSA,L]
  RewriteRule ^page-([A-Za-z0-9]+)   /tiki-index.php?page=$1                   [QSA,L]
  RewriteRule ^irc([0-9]+)           /tiki-irc_logs.php?focus=$1               [QSA,L]

  # todo add support for all characters allowed in a Wiki name
  # make sure this is the last rule!
  RewriteRule ^([-_\+A-Za-z0-9]+)$    /tiki-index.php?page=$1                   [QSA,L]
The game of the month : find the pp bug !

That page had an odd problem of display recently.

I investigated and that's really odd it looks like it depends on the number of line of the rule. I srip some lines, and, at one point, it works, after 9 liners removed, whatever the lines. I fixed it by splitting the preformatted tag in two. I tried np, pp and CODE, same result... mose


--
For an example, please see: http://tikiwiki.org/apache.conf

--
Fixed the rewrite rules a bit, primarily by trial and error, based on http://tikiwiki.org/SEFURLs - Having a "slash" in beginning of the the rewriterule didn't work,
is this an apache2 thing maybe? Don't think spacing in Wiki names will work yet either.
FunkyPenguin 2004-07-01
You can now find SEF URL mod in the mods.tikiwiki.org file gallery

--
A very wise post from Loyd Wood :

For the upcoming version, you say:
"Search-engine friendliness: Re-write rules added so your Tiki objects can be accessed in a search-engine friendly way"

What would it take to provide better naming of tiki pages?
wiki/RandomSubjectName
is far better expressed as
wiki/Random-Subject-Name

so that e.g. google can pick up on the individual words and index them with high priority. Most 80sTrendyAppleCaps wikis fare badly in search engines as a result; the hyphenated form should imo be the default, and that would work better with typos and Apache's mod_speling too.

thanks.

L.
--
Loyd: I think spaces are now supported in object names, so: wiki/Random+Subject+Name
SEWilco 2004-04-14

History

Advanced
Information Version
drsassafras Mass search and replace 22
View
drsassafras Mass search and replace 21
View
Marc Laporte 20
View
Marc Laporte no longer relevant 19
View
Marc Laporte more info 18
View
Marc Laporte cleanup 17
View
Jason Diceman add disable the re-writes in a directory code 16
View
Lorinc 15
View
Juzan Jean-Michel 14
View
Juzan Jean-Michel 13
View
Damian Parker tidy up and move the junk to the bottom. 12
View
Jason Diceman add mod link 11
View
funkypenguin 10
View
SEWilco Noted Wiki Names allow spaces 9
View
Marc Laporte 8
View
Mose 7
View
Mose 6
View
Mose 3
View
Mose added numbers in rule for wiki pages match 2
View