Advertisement
giO89R

htaccess

Oct 28th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1.  
  2. # Lines That should already be in your .htacess
  3. <Files "config.php">
  4. Order Allow,Deny
  5. Deny from All
  6. </Files>
  7. <Files "common.php">
  8. Order Allow,Deny
  9. Deny from All
  10. </Files>
  11.  
  12. # You may need to un-comment the following lines
  13. # Options +FollowSymlinks
  14. # To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
  15. # Options -MultiViews
  16. # REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
  17. RewriteEngine On
  18. # Uncomment the statement below if you want to make use of
  19. # HTTP authentication and it does not already work.
  20. # This could be required if you are for example using PHP via Apache CGI.
  21. # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  22. # REWRITE BASE
  23. RewriteBase /
  24. # HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
  25. # RewriteCond %{HTTP_HOST} !^geekube\.com$ [NC]
  26. # RewriteRule ^(.*)$ http://geekube.com/$1 [QSA,L,R=301]
  27.  
  28. # DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
  29. RewriteCond %{REQUEST_FILENAME} -f [OR]
  30. RewriteCond %{REQUEST_FILENAME} -d
  31. RewriteRule . - [L]
  32. #####################################################
  33. # PHPBB SEO REWRITE RULES ALL MODES
  34. #####################################################
  35. # AUTHOR : dcz www.phpbb-seo.com
  36. # STARTED : 01/2006
  37. #################################
  38. # FORUMS PAGES
  39. ###############
  40. # FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
  41. # RewriteRule ^forum/forum\.html$ /forum/index.php [QSA,L,NC]
  42. # FORUM ALL MODES
  43. RewriteRule ^forum/(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$ /forum/viewforum.php?f=$2&start=$4 [QSA,L,NC]
  44. # TOPIC WITH VIRTUAL FOLDER ALL MODES
  45. RewriteRule ^forum/(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
  46. # TOPIC WITHOUT FORUM ID & DELIM ALL MODES
  47. RewriteRule ^forum/([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ /forum/viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
  48. # PHPBB FILES ALL MODES
  49. RewriteRule ^forum/resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ /forum/download/file.php?id=$2&t=$1 [QSA,L,NC]
  50. # PROFILES ALL MODES WITH ID
  51. RewriteRule ^forum/(member|[a-z0-9_-]*-u)([0-9]+)\.html$ /forum/memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
  52. # USER MESSAGES ALL MODES WITH ID
  53. RewriteRule ^forum/(member|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /forum/search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
  54. # GROUPS ALL MODES
  55. RewriteRule ^forum/(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ /forum/memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
  56. # POST
  57. RewriteRule ^forum/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
  58. # ACTIVE TOPICS
  59. RewriteRule ^forum/active-topics(-([0-9]+))?\.html$ /forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
  60. # UNANSWERED TOPICS
  61. RewriteRule ^forum/unanswered(-([0-9]+))?\.html$ /forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
  62. # NEW POSTS
  63. RewriteRule ^forum/newposts(-([0-9]+))?\.html$ /forum/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
  64. # UNREAD POSTS
  65. RewriteRule ^forum/unreadposts(-([0-9]+))?\.html$ /forum/search.php?search_id=unreadposts&start=$2 [QSA,L,NC]
  66. # THE TEAM
  67. RewriteRule ^forum/the-team\.html$ /forum/memberlist.php?mode=leaders [QSA,L,NC]
  68. # HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
  69.  
  70. # FORUM WITHOUT ID & DELIM ALL MODES
  71. # THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
  72. RewriteCond %{REQUEST_FILENAME} !-f
  73. RewriteRule ^forum/([a-z0-9_-]+)(-([0-9]+))\.html$ /forum/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
  74. RewriteCond %{REQUEST_FILENAME} !-f
  75. RewriteRule ^forum/([a-z0-9_-]+)\.html$ /forum/viewforum.php?forum_uri=$1 [QSA,L,NC]
  76. # FIX RELATIVE PATHS : FILES
  77. RewriteRule ^forum/.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /forum/$1 [QSA,L,NC,R=301]
  78. # FIX RELATIVE PATHS : IMAGES
  79. RewriteRule ^forum/.+/(styles/.*|images/.*)/$ /forum/$1 [QSA,L,NC,R=301]
  80. # END PHPBB PAGES
  81. #####################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement