Advertisement
Guest User

lmao_htaccess_original

a guest
Jun 25th, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.72 KB | None | 0 0
  1. # $Id: _htaccess 44586 2013-01-22 14:05:07Z jyhem $ [This line is used to check that this configuration file is up to date. Do not edit this line and leave it as the first line.]
  2. # These are suggested configuration directives for use with Tiki.
  3. # They enhance security and permit clean URLs.
  4. # In your Tiki instance, visit tiki-admin.php?page=sefurl to make Tiki use clean URLs in generated links.
  5. #
  6. # To use, ideally, create a symbolic link from .htaccess to _htaccess. This will keep the configuration up-to-date.
  7. # If you can't, do one of the following:
  8. # - Copy _htaccess to .htaccess. Note : Do not move (rename) _htaccess, it is required for other uses (like SEFURL).
  9. # - Add the content of this file to your httpd.conf.
  10. # This should be repeated when the reference _htaccess file changes (when upgrading Tiki).
  11.  
  12. #
  13. # Please find more info here
  14. # http://doc.tiki.org/Rewrite+Rules
  15.  
  16. # DEVELOPERS: This configuration must be kept synchronized with the configuration for other Web servers. See http://dev.tiki.org/Operating+System+independence#Keep_web.config_and_.htaccess_synchronized
  17.  
  18. #Redirect bogus directories, which otherwise cause a broken page to upload very slowly
  19. #e.g., try yourdomain.com/bogus/ or yourdomain.com/tiki/bogus/ and see what happens
  20. #The below may not work in all configurations depending on redirects already in place
  21. #If certain directories containing other programs are legitimate (eg when tiki is installed in a subdirectory),
  22. #then you will first need a condition like the following
  23. #RewriteCond %{REQUEST_URI} !(^/otherokaydirectory/)
  24. #Then use something like this if your tiki program is in a subdirectory
  25. #RewriteRule ^(.+[^/])/$ /tiki/HomePage [R=301,L]
  26. #Use this if tiki is installed in the root (above condition probably not necessary in this case)
  27. #RewriteRule ^(.+[^/])/$ /HomePage [R=301,L]
  28.  
  29. # This prevents reading of files with certain extensions.
  30. <FilesMatch "\.(bak|inc|lib|sh|tpl|sql)$">
  31. order deny,allow
  32. deny from all
  33. </FilesMatch>
  34.  
  35. # This prevents reading of tags file for developpers who run ctags on their server
  36. #<Files tags>
  37. # order deny,allow
  38. # deny from all
  39. #</Files>
  40.  
  41. <IfModule mod_dir.c>
  42. DirectoryIndex index.php
  43. # if using wiki as homepage feature you may avoid the home page name being appended to the url by replacing the previous line with the following line
  44. #DirectoryIndex tiki-index.php index.php
  45. </IfModule>
  46.  
  47. <IfModule deflate_module>
  48. AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript application/javascript
  49. </IfModule>
  50.  
  51. # Using ETags will improve the YSlow scores
  52. FileETag none
  53.  
  54. # If the site is stable, might be worth setting the expires header on all files for optimization.
  55. #<IfModule mod_expires.c>
  56. # <FilesMatch "\.(js|png|gif|jpg|css|ico)$">
  57. # ExpiresActive on
  58. # ExpiresDefault "access plus 6 months"
  59. # </FilesMatch>
  60. #</IfModule>
  61.  
  62. # if you want to use the Web Server Auth
  63. #AuthType Basic
  64. #AuthName "Restricted Access"
  65. #AuthUserFile /etc/httpd/passwords
  66. #Require valid-user
  67.  
  68. # Handling errors catched by Apache with Tiki
  69. # Tiki can catch some errors and deal with them by redirecting to a similar page, sending you to the search, etc. However, some errors do not reach Tiki and are only catched by Apache (ex.: filenameThatDoesntExist.php).
  70. # To make Tiki handle errors catched by Apache, uncomment some of the following lines and adapt the page names. You must create the pages before trying to use them.
  71. #ErrorDocument 404 /tiki-index.php?page=File+not+found
  72. #ErrorDocument 500 /tiki-index.php?page=Server+error
  73.  
  74. # Permanent redirect: Add directive as the example below. This is useful if you were using another Web application or static HTML and you want to avoid broken links.
  75. # Redirect 301 /oldpage.html /tiki-index.php?page=newpage
  76.  
  77. # Tiki requires PHP 5. If your host doesn't offer PHP 5 by default, it's possible that it can be activated by using (uncommenting) the lines below. Check with your host.
  78. # AddType application/x-httpd-php5 .php
  79. # AddHandler application/x-httpd-php5 .php
  80.  
  81. # to activate the error display, uncomment the following line
  82. #php_flag display_errors on
  83.  
  84. # to set the error_reporting level, uncomment the following line. Values are explained here: http://www.php.net/manual/en/errorfunc.constants.php
  85. # php_value error_reporting E_ALL
  86.  
  87. # increase memory (default is 128M). Use this if you are getting blank pages and strange errors
  88. # php_value memory_limit 256M
  89.  
  90. # increase execution time (default value in apache use to be 30, and in some cases of long wiki pages with many plugins it may take longer)
  91. #php_value max_execution_time 90
  92.  
  93. # increase the maximum file size for uploads allowed by php for Tiki (default value in apache use to be 2M which is usually too low for pdf or documents with some images, screenshots, etc)
  94. #php_value upload_max_filesize 10M
  95. #php_value post_max_size 11M
  96.  
  97. # This sets the maximum time in seconds a script is allowed to parse input data, like POST and GET.
  98. #php_value max_input_time 90
  99.  
  100. # In some cases you may see open_basedir warnings about Smarty accessing php files that it shouldn't
  101. # The following line (uncommented) will reset the include path to use only Tiki's files which will solve this in most cases
  102. #php_value include_path "."
  103.  
  104. # some features like assigning perms to a group with a name containing a quote will not work without this
  105. #php_flag magic_quotes_gpc off
  106.  
  107. <IfModule mod_rewrite.c>
  108. RewriteEngine On
  109.  
  110. # Rewrite rules to maintain any hard-coded URLs following http://dev.tiki.org/ImgDirectoryRevamp
  111. RewriteRule ^img/icons2/(.*)$ img/icons/$1
  112. RewriteRule ^pics/large/(.*)$ img/icons/large/$1
  113. RewriteRule ^img/mytiki/(.*)$ img/icons/large/$1
  114. RewriteRule ^pics/(.*)$ img/$1
  115. RewriteRule ^images/(.*)$ img/icons/$1
  116.  
  117. # Apache does not pass Authorization header to CGI scripts
  118. # Rewrite rules for passing authorisation in CGI or FGI mode
  119. RewriteCond %{HTTP:Authorization} ^(.*)
  120. RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
  121.  
  122.  
  123. # You may need to uncomment and fix the RewriteBase value below to suit your installation. e.g. if your Tiki is not installed directly in the web root.
  124. #RewriteBase /tiki
  125. # And if you get errors like "The requested URL /absolutepath/tiki-index.php was not found on this server",
  126. # You may need to uncomment the following line.
  127. RewriteBase /
  128.  
  129. #If your website is a checkout
  130. RewriteRule .*/\.svn/.* - [F,L]
  131.  
  132. # If the URL points to a file then do nothing
  133. RewriteCond %{REQUEST_FILENAME} -s [OR]
  134. RewriteCond %{REQUEST_FILENAME} -l [OR]
  135. RewriteCond %{REQUEST_FILENAME} -f [OR]
  136. RewriteCond %{REQUEST_FILENAME} -d
  137. RewriteRule (.*) - [L]
  138.  
  139. # Rewrite rule to make this Tiki a profiles repository (uncomment to enable)
  140. # Set the parentId (here set as 1) to the Id of the category containing your profile pages
  141. # See http://doc.tiki.org/Profiles for more
  142. # Note: you need to allow tiki_p_view_category and tiki_p_export_wiki for anonymous to be a repository
  143. # and enable feature_wiki_export (as well as feature_wiki and feature_categories)
  144. #RewriteRule ^profiles$ tiki-browse_categories.php?find=&deep=on&type=wiki+page&parentId=1&sort_mode=name_asc&plain&maxRecords=1000000 [L]
  145.  
  146. # Rule to make a short link to a list of object to export as a plain text sitemap
  147. # Set the parentId (here set as 2) to the id of a category containing the objects you wish to be crawled by search engines
  148. #
  149. #RewriteRule ^sitemap.txt$ tiki-browse_categories.php?find=&deep=on&type=wiki+page&parentId=2&sort_mode=name_asc&links&maxRecords=1000000 [L]
  150.  
  151. # direct one-word access
  152. RewriteRule ^(img\/trackers\/.*) $1 [L]
  153. RewriteRule ^calendar$ tiki-calendar.php [L]
  154. RewriteRule ^articles$ tiki-view_articles.php [L]
  155. RewriteRule ^blogs$ tiki-list_blogs.php [L]
  156. RewriteRule ^categories$ tiki-browse_categories.php [L]
  157. RewriteRule ^chat$ tiki-chat.php [L]
  158. RewriteRule ^contact$ tiki-contact.php [L]
  159. RewriteRule ^directories$ tiki-directory_browse.php [L]
  160. RewriteRule ^faqs$ tiki-list_faqs.php [L]
  161. RewriteRule ^filelist$ tiki-list_file_gallery.php [L]
  162. RewriteRule ^forums$ tiki-forums.php [L]
  163. RewriteRule ^galleries$ tiki-galleries.php [L]
  164. RewriteRule ^login$ tiki-login_scr.php [L]
  165. RewriteRule ^logout$ tiki-logout.php [L]
  166. # Note that email validation will not work if tiki-register.php is rewritten.
  167. # RewriteRule ^register$ tiki-register.php [L]
  168. RewriteRule ^my$ tiki-my_tiki.php [L]
  169. RewriteRule ^newsletters$ tiki-newsletters.php [L]
  170. RewriteRule ^quizzes$ tiki-list_quizzes.php [L]
  171. RewriteRule ^sheets$ tiki-sheets.php [L]
  172. RewriteRule ^stats$ tiki-stats.php [L]
  173. RewriteRule ^surveys$ tiki-list_surveys.php [L]
  174. RewriteRule ^trackers$ tiki-list_trackers.php [L]
  175. RewriteRule ^users$ tiki-list_users.php [L]
  176. RewriteRule ^userinfo$ tiki-view_tracker_item.php?view=+user&cookietab=2 [L]
  177.  
  178. # access a link to any user by providing its username (exact match) after u:
  179. # (uncomment to enable)
  180. #RewriteRule ^u:([A-Za-z0-9]+) tiki-view_tracker_item.php?user=$1&view=+user [QSA,L]
  181. # alternative procedure to show a list of users with that string
  182. # (adapt with your user tracker id and user selector field id)
  183. #RewriteRule ^u:([A-Za-z0-9]+) tiki-view_tracker.php?trackerId=1&filterfield=3&filtervalue\[3\]=$1 [QSA,L]
  184.  
  185. # access any object by its numeric identifier
  186. RewriteRule ^article([0-9]+)\-.*(&comzone=.*)$ article$1$2
  187. RewriteRule ^article([0-9]+)\-.*$ article$1
  188. RewriteRule ^blog([0-9]+)\-.*$ blog$1
  189. RewriteRule ^blogpost([0-9]+)\-.*$ blogpost$1
  190. RewriteRule ^article([0-9]+)(.*) tiki-read_article.php?articleId=$1$2 [QSA,L]
  191. RewriteRule ^art([0-9]+)(.*) tiki-read_article.php?articleId=$1$2 [QSA,L]
  192.  
  193. # The following supports up to seven merged calendars; most to least. SEWilco 2008-07-15
  194. 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]
  195. 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]
  196. 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]
  197. RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3&calIds[]=$4 [QSA,L]
  198. RewriteRule ^cal([0-9]+),([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2&calIds[]=$3 [QSA,L]
  199. RewriteRule ^cal([0-9]+),([0-9]+) tiki-calendar.php?calIds[]=$1&calIds[]=$2 [QSA,L]
  200. RewriteRule ^cal([0-9]+) tiki-calendar.php?calIds[]=$1 [QSA,L]
  201.  
  202. RewriteRule ^cat([0-9]+)\-?[^&]*(.*) tiki-browse_categories.php?parentId=$1$2 [QSA,L]
  203. RewriteRule ^blog([0-9]+)(.*) tiki-view_blog.php?blogId=$1$2 [QSA,L]
  204. RewriteRule ^blogpost([0-9]+)(.*) tiki-view_blog_post.php?postId=$1$2 [QSA,L]
  205. RewriteRule ^browseimage([0-9]+)(.*) tiki-browse_image.php?imageId=$1$2 [QSA,L]
  206. RewriteRule ^directory([0-9]+)(.*) tiki-directory_browse.php?parent=$1$2 [QSA,L]
  207. RewriteRule ^dirlink([0-9]+) tiki-directory_redirect.php?siteId=$1 [QSA,L]
  208. RewriteRule ^faq([0-9]+)(.*) tiki-view_faq.php?faqId=$1$2 [QSA,L]
  209. RewriteRule ^file([0-9]+)(.*) tiki-list_file_gallery.php?galleryId=$1$2 [QSA,L]
  210. RewriteRule ^dl([0-9]+)(.*) tiki-download_file.php?fileId=$1$2 [QSA,L]
  211. RewriteRule ^thumbnail([0-9]+)(.*) tiki-download_file.php?fileId=$1&thumbnail$2 [QSA,L]
  212. RewriteRule ^display([0-9]+)(.*) tiki-download_file.php?fileId=$1&display$2 [QSA,L]
  213. RewriteRule ^preview([0-9]+)(.*) tiki-download_file.php?fileId=$1&preview$2 [QSA,L]
  214. RewriteRule ^forum([0-9]+)(.*) tiki-view_forum.php?forumId=$1$2 [QSA,L]
  215. RewriteRule ^forumthread([0-9]+)(.*) tiki-view_forum_thread.php?comments_parentId=$1$2 [QSA,L]
  216. RewriteRule ^gallery([0-9]+)(.*) tiki-browse_gallery.php?galleryId=$1$2 [QSA,L]
  217. RewriteRule ^img([0-9]+)(.*) show_image.php?id=$1$2 [QSA,L]
  218. RewriteRule ^image([0-9]+)(.*) show_image.php?id=$1$2 [QSA,L]
  219. RewriteRule ^imagescale([0-9]+)/([0-9]+)(.*) show_image.php?id=$1&scalesize=$2$3 [QSA,L]
  220. RewriteRule ^newsletter([0-9]+)(.*) tiki-newsletters.php?nlId=$1$2&info=1 [QSA,L]
  221. RewriteRule ^quiz([0-9]+)(.*) tiki-take_quiz.php?quizId=$1$2 [QSA,L]
  222. RewriteRule ^survey([0-9]+)(.*) tiki-take_survey.php?surveyId=$1$2 [QSA,L]
  223. RewriteRule ^tracker([0-9]+)(.*) tiki-view_tracker.php?trackerId=$1$2 [QSA,L]
  224. RewriteRule ^item([0-9]+)(.*) tiki-view_tracker_item.php?itemId=$1$2 [QSA,L]
  225. RewriteRule ^int([0-9]+)(.*) tiki-integrator.php?repID=$1$2 [QSA,L]
  226. RewriteRule ^sheet([0-9]+)(.*) tiki-view_sheets.php?sheetId=$1$2 [QSA,L]
  227. RewriteRule ^poll([0-9]+)(.*) tiki-poll_form.php?pollId=$1$2 [QSA,L]
  228. RewriteRule ^wiki-([A-Za-z0-9]+) tiki-index.php?page=$1 [QSA,L]
  229. RewriteRule ^page-([A-Za-z0-9]+) tiki-index.php?page=$1 [QSA,L]
  230. RewriteRule ^show:(~?)(.+)$ tiki-slideshow.php?page=$1$2 [QSA,L]
  231. RewriteRule ^user([0-9]+)(.*) tiki-user_information.php?userId=$1$2 [QSA,L]
  232. RewriteRule ^(lib/wiki3d/.+\.jar)$ $1 [L]
  233.  
  234. # Stop processing filenames here, so that 404 errors are returned (for example if the URL contains a typo like tiki-indexx.php) rather than being interpreted as a match to a broad rule.
  235. # "Dirty URL"s will stop here.
  236. RewriteRule \.(css|gif|jpg|png|php|html|js|htm|shtml|cgi|sql|phtml|txt|ihtml) - [last]
  237.  
  238. #Redirect addresses with bogus directories: e.g., example.com/bogus/.*
  239. #Otherwise causes a broken page to load
  240. #RewriteRule ^.*/.*$ http://www.example.com/Page+Not+Found [L]
  241.  
  242.  
  243. RewriteRule ^tiki-([a-z_]+)-([a-z_]+) tiki-ajax_services.php?controller=$1&action=$2 [QSA,L]
  244. RewriteRule ^tiki-([a-z_]+) tiki-ajax_services.php?controller=$1 [QSA,L] # action may be specified in request body (POST)
  245. RewriteRule ^(.+)$ tiki-index.php?page=$1 [QSA,L]
  246.  
  247. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement