# $Id: _htaccess 31317 2010-12-09 17:35:54Z jonnybradley $ [This line is used to check that this htaccess file is up to date. Do not edit this line and leave it as the first line.] # These are suggested Rewrite Rules for use with Tiki. # They enhance security and permit short URLs. # In your Tiki instance, visit tiki-admin.php?page=sefurl # # To use # 1- rename _htaccess to .htaccess # or # 2- add the content of this file to your httpd.conf # # Please find more info here # http://doc.tiki.org/Rewrite+Rules # # This prevents reading of files with certain extensions. order deny,allow deny from all FileEtag None # If the site is stable, might be worth setting the expires header on all files # # # ExpiresActive on # ExpiresDefault "access plus 10 years" # # # Using ETags will lower the YSlow scores FileETag none AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript RewriteEngine On # Apache does not pass Authorization header to CGI scripts # Rewrite rules for passing authorisation in CGI or FGI mode RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] # If your Tiki is not at the root of the server (e.g. at http://example.com/tiki) # You will need to uncomment and fix the RewriteBase value below to suit your installation. # RewriteBase "/tiki" # And if you get errors like "The requested URL /absolutepath/tiki-index.php was not found on this server", # You may need to uncomment the following line. # RewriteBase / #If your website is a checkout RewriteRule ^\.svn/ - [F,L] # If the URL points to a file then do nothing RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule (.*) - [L] # Rewrite rule to make this Tiki a profiles repository (uncomment to enable) # Set the parentId (here set as 1) to the Id of the category containing your profile pages # See http://doc.tiki.org/Profiles for more # Note: you need to allow tiki_p_view_category and tiki_p_export_wiki for anonymous to be a repository # and enable feature_wiki_export (as well as feature_wiki and feature_categories) #RewriteRule ^profiles$ tiki-browse_categories.php?find=&deep=on&type=wiki+page&parentId=1&sort_mode=name_asc&plain&maxRecords=1000000 [L] # Tiki 3.0 requires PHP5. If your host doesn't offer PHP5 by default, it's possible that it can be activated by using (uncommenting) the lines below. Check with your host. # AddType application/x-httpd-php5 .php # AddHandler application/x-httpd-php5 .php # direct one-word access RewriteRule ^(img\/trackers\/.*) $1 [L] RewriteRule ^calendar$ tiki-calendar.php [L] RewriteRule ^articles$ tiki-view_articles.php [L] RewriteRule ^blogs$ tiki-list_blogs.php [L] # The following supports up to seven merged calendars; most to least. SEWilco 2008-07-15 RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3&calIds[]=$4&calIds[]=$5&calIds[]=$6&calIds[]=$7 [QSA,L] RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3&calIds[]=$4&calIds[]=$5&calIds[]=$6 [QSA,L] RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3&calIds[]=$4&calIds[]=$5 [QSA,L] RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3&calIds[]=$4 [QSA,L] RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3 [QSA,L] RewriteRule ^cal([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2 [QSA,L] RewriteRule ^cal([0-9]+) tiki-calendar.php?calIds[]=$1 [QSA,L] RewriteRule ^categories$ tiki-browse_categories.php [L] RewriteRule ^chat$ tiki-chat.php [L] RewriteRule ^contact$ tiki-contact.php [L] RewriteRule ^directories$ tiki-directory_browse.php [L] RewriteRule ^dirlink([0-9]+) tiki-directory_redirect.php?siteId=$1 [QSA,L] RewriteRule ^faqs$ tiki-list_faqs.php [L] RewriteRule ^files$ tiki-list_file_gallery.php [L] RewriteRule ^forums$ tiki-forums.php [L] RewriteRule ^images$ tiki-galleries.php [L] RewriteRule ^galleries$ tiki-galleries.php [L] RewriteRule ^login$ tiki-login_scr.php [L] RewriteRule ^logout$ tiki-logout.php [L] RewriteRule ^register$ tiki-register.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 ^mobile$ tiki-mobile.php [L] RewriteRule ^wml$ tiki-mobile.php [L] RewriteRule ^sheets$ tiki-sheets.php [L] # access any object by its numeric identifier RewriteRule ^article([0-9]+)\-.*(&comzone=.*)$ article$1$2 RewriteRule ^article([0-9]+)\-.*$ article$1 RewriteRule ^blog([0-9]+)\-.*$ blog$1 RewriteRule ^blogpost([0-9]+)\-.*$ blogpost$1 RewriteRule ^article([0-9]+)(.*) tiki-read_article.php?articleId=$1$2 [QSA,L] RewriteRule ^art([0-9]+)(.*) tiki-read_article.php?articleId=$1$2 [QSA,L] RewriteRule ^cat([0-9]+)(.*) tiki-browse_categories.php?parentId=$1$2 [QSA,L] RewriteRule ^blog([0-9]+)(.*) tiki-view_blog.php?blogId=$1$2 [QSA,L] RewriteRule ^blogpost([0-9]+)(.*) tiki-view_blog_post.php?postId=$1$2 [QSA,L] RewriteRule ^browseimage([0-9]+)(.*) tiki-browse_image.php?imageId=$1$2 [QSA,L] RewriteRule ^directory([0-9]+)(.*) tiki-directory_browse.php?parent=$1$2 [QSA,L] RewriteRule ^faq([0-9]+)(.*) tiki-view_faq.php?faqId=$1$2 [QSA,L] RewriteRule ^file([0-9]+)(.*) tiki-list_file_gallery.php?galleryId=$1$2 [QSA,L] RewriteRule ^dl([0-9]+)(.*) tiki-download_file.php?fileId=$1$2 [QSA,L] RewriteRule ^thumbnail([0-9]+)(.*) tiki-download_file.php?fileId=$1&thumbnail$2 [QSA,L] RewriteRule ^display([0-9]+)(.*) tiki-download_file.php?fileId=$1&display$2 [QSA,L] RewriteRule ^preview([0-9]+)(.*) tiki-download_file.php?fileId=$1&preview$2 [QSA,L] RewriteRule ^forum([0-9]+)(.*) tiki-view_forum.php?forumId=$1$2 [QSA,L] RewriteRule ^gallery([0-9]+)(.*) tiki-browse_gallery.php?galleryId=$1$2 [QSA,L] RewriteRule ^img([0-9]+)(.*) show_image.php?id=$1$2 [QSA,L] RewriteRule ^image([0-9]+)(.*) show_image.php?id=$1$2 [QSA,L] RewriteRule ^imagescale([0-9]+)/([0-9]+)(.*) show_image.php?id=$1&scalesize=$2$3 [QSA,L] RewriteRule ^newsletter([0-9]+)(.*) tiki-newsletters.php?nlId=$1$2 [QSA,L] RewriteRule ^quiz([0-9]+)(.*) tiki-take_quiz.php?quizId=$1$2 [QSA,L] RewriteRule ^survey([0-9]+)(.*) tiki-take_survey.php?surveyId=$1$2 [QSA,L] RewriteRule ^tracker([0-9]+)(.*) tiki-view_tracker.php?trackerId=$1$2 [QSA,L] RewriteRule ^item([0-9]+)(.*) tiki-view_tracker_item.php?itemId=$1$2 [QSA,L] RewriteRule ^int([0-9]+)(.*) tiki-integrator.php?repID=$1$2 [QSA,L] RewriteRule ^sheet([0-9]+)(.*) tiki-view_sheets.php?sheetId=$1$2 [QSA,L] RewriteRule ^poll([0-9]+)(.*) tiki-poll_form.php?pollId=$1$2 [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 ^show:(~?)(.+)$ tiki-slideshow.php?page=$1$2 [QSA,L] RewriteRule ^user([0-9]+)(.*) tiki-user_information.php?userId=$1$2 [QSA,L] RewriteRule ^(lib/wiki3d/.+\.jar)$ $1 [L] RewriteRule \.(css|gif|jpg|png|php|html|js|htm|shtml|cgi|sql|phtml|txt|ihtml) - [L] RewriteRule ^(.+)$ tiki-index.php?page=$1 [QSA,L] # End of rewrite rules # Error pages, handled by Apache (not by Tiki) # Tiki can catch some errors and deal with them by redirecting to a similar page, sending you to the search, etc. However, some errors bypass Tiki and must be handled by Apache (ex.: impossiblepagename.php) # To use Apache error handling, uncomment the following line and adapt the page name. You must create the page before trying to use it. # ErrorDocument 404 /tiki-index.php?page=Page+not+found # to activate the error display, uncomment the following line #php_flag display_errors on # increase memory #php_value memory_limit 128M # In some cases you may see open_basedir warnings about Smarty accessing php files that it shouldn't # The following line (uncommented) will reset the include path to use only Tiki's files which will solve this in most cases #php_value include_path "." # if you want to use the Web Server Auth #AuthType Basic #AuthName "Restricted Access" #AuthUserFile /etc/httpd/passwords #Require valid-user DirectoryIndex tiki-index.php