JarekMk

Untitled

Mar 17th, 2011
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.67 KB | None | 0 0
  1. # BROWSER BUFFERING
  2. <FilesMatch "\.(html|htm|xml|txt|xsl)$">
  3. Header set Cache-Control "max-age=3600, must-revalidate"
  4. </FilesMatch>
  5.  
  6. <FilesMatch "\.(js|css|ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
  7. Header set Cache-Control "max-age=2851200, public"
  8. Header set Expires "Sun, 17 July 2010 20:00:00 GMT"
  9. </FilesMatch>
  10.  
  11.  
  12.  
  13. # Lines That should already be in your .htacess
  14. <Files "config.php">
  15. Order Allow,Deny
  16. Deny from All
  17. </Files>
  18. <Files "common.php">
  19. Order Allow,Deny
  20. Deny from All
  21. </Files>
  22.  
  23. # You may need to un-comment the following lines
  24. # Options +FollowSymlinks
  25. # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
  26. # Options -MultiViews
  27. # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
  28. RewriteEngine On
  29. # Uncomment the statement below if you want to make use of
  30. # HTTP authentication and it does not already work.
  31. # This could be required if you are for example using PHP via Apache CGI.
  32. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  33. # REWRITE BASE
  34. RewriteBase /
  35. # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
  36. # RewriteCond %{HTTP_HOST} !^forum\.safegroup\.pl$ [NC]
  37. # RewriteRule ^(.*)$ http://forum.safegroup.pl/$1 [QSA,L,R=301]
  38.  
  39. # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
  40. RewriteCond %{REQUEST_FILENAME} -f
  41. RewriteCond %{REQUEST_FILENAME} -d
  42. RewriteRule . - [L]
  43. #####################################################
  44. # PHPBB SEO REWRITE RULES ALL MODES
  45. #####################################################
  46. # AUTHOR : dcz www.phpbb-seo.com
  47. # STARTED : 01/2006
  48. #################################
  49. # FORUMS PAGES
  50. ###############
  51. # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
  52. # RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
  53. # FORUM ALL MODES
  54. RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$2&start=$4 [QSA,L,NC]
  55. # TOPIC WITH VIRTUAL FOLDER ALL MODES
  56. RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
  57. # TOPIC WITHOUT FORUM ID & DELIM ALL MODES
  58. RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
  59. # PHPBB FILES ALL MODES
  60. RewriteRule ^zasoby/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /download/file.php?id=$2&t=$1 [QSA,L,NC]
  61. # PROFILES ALL MODES WITH ID
  62. RewriteRule ^(uzytkownik|[a-z0-9_-]*-u)([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
  63. # USER MESSAGES ALL MODES WITH ID
  64. RewriteRule ^(uzytkownik|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
  65. # GROUPS ALL MODES
  66. RewriteRule ^(grupa|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
  67. # POST
  68. RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
  69. # ACTIVE TOPICS
  70. RewriteRule ^aktywne-tematy(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
  71. # UNANSWERED TOPICS
  72. RewriteRule ^nieprzegladane-tematy(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
  73. # NEW POSTS
  74. RewriteRule ^nowe-posty(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
  75. # UNREAD POSTS
  76. RewriteRule ^nieprzegladane-posty(-([0-9]+))?\.html$ /search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
  77. # THE TEAM
  78. RewriteRule ^ekipa\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
  79. # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
  80.  
  81. #####################################################
  82. # GYM Sitemaps & RSS
  83. # Global channels
  84. RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /gymrss.php?channels&$2&$4&$6 [QSA,L,NC]
  85. # HTML Global news & maps
  86. RewriteRule ^(news|maps)/?(page([0-9]+)\.html)?$ /map.php?$1&start=$3 [QSA,L,NC]
  87. # END GYM Sitemaps & RSS
  88. #####################################################
  89.  
  90. # FORUM WITHOUT ID & DELIM ALL MODES
  91. # THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
  92. RewriteCond %{REQUEST_FILENAME} !-f
  93. RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
  94. RewriteCond %{REQUEST_FILENAME} !-f
  95. RewriteRule ^([a-z0-9_-]+)\.html$ /viewforum.php?forum_uri=$1 [QSA,L,NC]
  96. # FIX RELATIVE PATHS : FILES
  97. RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /$1 [QSA,L,NC,R=301]
  98. # FIX RELATIVE PATHS : IMAGES
  99. RewriteRule ^.+/(styles/.*|images/.*)/$ /$1 [QSA,L,NC,R=301]
  100. # END PHPBB PAGES
  101. #####################################################
  102.  
  103. #####################################################
  104. # GYM Sitemaps & RSS
  105. # HTML Module additional modes
  106. RewriteRule ^(news|maps)/([a-z0-9_-]+)(/([a-z0-9_-]+))?/?(page([0-9]+)\.html)?$ /map.php?$2=$4&$1&start=$6 [QSA,L,NC]
  107. # Main feeds & channels
  108. RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ /gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [QSA,L,NC]
  109. # Module feeds
  110. RewriteRule ^[a-z0-9_-]*-[a-z]{1,2}([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [QSA,L,NC]
  111. # Module feeds without ids
  112. RewriteRule ^([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [QSA,L,NC]
  113. # Google SitemapIndex
  114. RewriteRule ^sitemapindex\.xml(\.gz)?$ /sitemap.php?gzip=$1 [QSA,L,NC]
  115. # Module cat sitemaps
  116. RewriteRule ^[a-z0-9_-]+-([a-z]{1,2})([0-9]+)\.xml(\.gz)?$ /sitemap.php?module_sep=$1&module_sub=$2&gzip=$3 [QSA,L,NC]
  117. # Module sitemaps
  118. RewriteRule ^([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ /sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]
  119. # END GYM Sitemaps & RSS
  120. #####################################################
Advertisement
Add Comment
Please, Sign In to add comment