Advertisement
Guest User

Untitled

a guest
Oct 27th, 2018
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 KB | None | 0 0
  1. Options +FollowSymLinks -MultiViews
  2.  
  3. # Secuirty Control
  4. <FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|tpl)$">
  5. Order Allow,Deny
  6. Deny from all
  7. </FilesMatch>
  8.  
  9. # Cache Control
  10. <IfModule mod_headers.c>
  11. <FilesMatch "\.(jpg|jpeg|png|gif|swf|css|js)$">
  12. Header set Cache-Control "max-age=604800, public"
  13. </FilesMatch>
  14. </IfModule>
  15.  
  16. # Gzip Control
  17. <IfModule mod_deflate.c>
  18. AddOutputFilterByType DEFLATE text/html
  19. AddOutputFilterByType DEFLATE text/css
  20. AddOutputFilterByType DEFLATE application/javascript
  21. AddOutputFilterByType DEFLATE image/jpg
  22. AddOutputFilterByType DEFLATE image/png
  23. AddOutputFilterByType DEFLATE text/plain
  24. AddOutputFilterByType DEFLATE text/xml
  25. AddOutputFilterByType DEFLATE text/javascript
  26. </IfModule>
  27.  
  28. RewriteEngine on
  29. RewriteCond %{REQUEST_FILENAME} -f [OR]
  30. RewriteCond %{REQUEST_FILENAME} -d
  31. RewriteRule .* - [L,QSA]
  32.  
  33. # Installer
  34. RewriteRule ^install/?$ install.php [L,QSA]
  35.  
  36. # Static Pages
  37. RewriteRule ^static/([^/]+)/?$ static.php?url=$1 [L,QSA]
  38.  
  39. # Contacts
  40. RewriteRule ^contacts/?$ contact.php [L,QSA]
  41.  
  42. # Directory
  43. RewriteRule ^directory/?$ directory.php [L,QSA]
  44. RewriteRule ^directory/([^/]+)/?$ directory.php?view=$1 [L,QSA]
  45. RewriteRule ^directory/([^/]+)/([^/]+)/?$ directory.php?view=$1&page=$2 [L,QSA]
  46.  
  47. # Search
  48. RewriteRule ^search/?$ search.php [L,QSA]
  49. RewriteRule ^search/hashtag/([^/]+)/?$ search.php?query=$1&hashtag=1 [L,QSA]
  50. RewriteRule ^search/([^/]+)/?$ search.php?query=$1&hashtag=0 [L,QSA]
  51.  
  52. # Sign(in|up|out)
  53. RewriteRule ^signin/?$ sign.php?do=in [L,QSA]
  54. RewriteRule ^signup/?$ sign.php?do=up [L,QSA]
  55. RewriteRule ^signout/?$ sign.php?do=out [L,QSA]
  56. RewriteRule ^reset/?$ sign.php?do=reset [L,QSA]
  57. RewriteRule ^activation/([^/]+)/([^/]+)/?$ activation.php?id=$1&token=$2 [L,QSA]
  58.  
  59. # Social Logins
  60. RewriteRule ^connect/([^/]+)/?$ connect.php?do=connect&provider=$1 [L,QSA]
  61. RewriteRule ^revoke/([^/]+)/?$ connect.php?do=revoke&provider=$1 [L,QSA]
  62.  
  63. # Packages
  64. RewriteRule ^packages/?$ packages.php [L,QSA]
  65.  
  66. # Started
  67. RewriteRule ^started/?$ started.php [L,QSA]
  68. RewriteRule ^started/finished?$ started.php?finished=true [L,QSA]
  69.  
  70. # Messages
  71. RewriteRule ^messages/?$ messages.php [L,QSA]
  72. RewriteRule ^messages/new?$ messages.php?view=new [L,QSA]
  73. RewriteRule ^messages/([^/]+)/?$ messages.php?cid=$1 [L,QSA]
  74.  
  75. # Notifications
  76. RewriteRule ^notifications/?$ notifications.php [L,QSA]
  77.  
  78. # Settings
  79. RewriteRule ^settings/?$ settings.php [L,QSA]
  80. RewriteRule ^settings/([^/]+)/?$ settings.php?view=$1 [L,QSA]
  81.  
  82. # Posts & Photos
  83. RewriteRule ^posts/([^/]+)/?$ post.php?post_id=$1 [L,QSA]
  84. RewriteRule ^photos/([^/]+)/?$ photo.php?photo_id=$1 [L,QSA]
  85.  
  86. # Saved
  87. RewriteRule ^saved/?$ index.php?view=saved [L,QSA]
  88.  
  89. # Ads
  90. RewriteRule ^ads/?$ ads.php [L,QSA]
  91. RewriteRule ^ads/new?$ ads.php?view=new [L,QSA]
  92. RewriteRule ^ads/edit/([^/]+)/?$ ads.php?view=edit&campaign_id=$1 [L,QSA]
  93. RewriteRule ^wallet/?$ ads.php?view=wallet [L,QSA]
  94.  
  95. # Boosted
  96. RewriteRule ^boosted/posts/?$ index.php?view=boosted_posts [L,QSA]
  97. RewriteRule ^boosted/pages/?$ index.php?view=boosted_pages [L,QSA]
  98.  
  99. # People
  100. RewriteRule ^people/?$ people.php [L,QSA]
  101. RewriteRule ^people/find/?$ people.php?view=find [L,QSA]
  102. RewriteRule ^people/friend_requests/?$ people.php?view=friend_requests [L,QSA]
  103. RewriteRule ^people/sent_requests/?$ people.php?view=sent_requests [L,QSA]
  104.  
  105. # Pages
  106. RewriteRule ^pages/?$ pages.php [L,QSA]
  107. RewriteRule ^pages/liked/?$ pages.php?view=liked [L,QSA]
  108. RewriteRule ^pages/manage/?$ pages.php?view=manage [L,QSA]
  109. RewriteRule ^pages/([^/]+)/?$ page.php?username=$1 [L,QSA]
  110. RewriteRule ^pages/([^/]+)/([^/]+)/?$ page.php?username=$1&view=$2 [L,QSA]
  111. RewriteRule ^pages/([^/]+)/([^/]+)/([^/]+)/?$ page.php?username=$1&view=$2&id=$3 [L,QSA]
  112.  
  113. # Groups
  114. RewriteRule ^groups/?$ groups.php [L,QSA]
  115. RewriteRule ^groups/joined/?$ groups.php?view=joined [L,QSA]
  116. RewriteRule ^groups/manage/?$ groups.php?view=manage [L,QSA]
  117. RewriteRule ^groups/([^/]+)/?$ group.php?username=$1 [L,QSA]
  118. RewriteRule ^groups/([^/]+)/([^/]+)/?$ group.php?username=$1&view=$2 [L,QSA]
  119. RewriteRule ^groups/([^/]+)/([^/]+)/([^/]+)/?$ group.php?username=$1&view=$2&id=$3 [L,QSA]
  120.  
  121. # Events
  122. RewriteRule ^events/?$ events.php [L,QSA]
  123. RewriteRule ^events/going/?$ events.php?view=going [L,QSA]
  124. RewriteRule ^events/interested/?$ events.php?view=interested [L,QSA]
  125. RewriteRule ^events/invited/?$ events.php?view=invited [L,QSA]
  126. RewriteRule ^events/manage/?$ events.php?view=manage [L,QSA]
  127. RewriteRule ^events/([^/]+)/?$ event.php?event_id=$1 [L,QSA]
  128. RewriteRule ^events/([^/]+)/([^/]+)/?$ event.php?event_id=$1&view=$2 [L,QSA]
  129. RewriteRule ^events/([^/]+)/([^/]+)/([^/]+)/?$ event.php?event_id=$1&view=$2&id=$3 [L,QSA]
  130.  
  131. # Forums
  132. RewriteRule ^forums/?$ forums.php [L,QSA]
  133. RewriteRule ^forums/my-threads/?$ forums.php?view=my-threads [L,QSA]
  134. RewriteRule ^forums/my-replies/?$ forums.php?view=my-replies [L,QSA]
  135. RewriteRule ^forums/search/?$ forums.php?view=search [L,QSA]
  136. RewriteRule ^forums/search-results/?$ forums.php?view=search-results [L,QSA]
  137. RewriteRule ^forums/new-thread/([^/]+)/?$ forums.php?view=new-thread&forum_id=$1 [L,QSA]
  138. RewriteRule ^forums/edit-thread/([^/]+)/?$ forums.php?view=edit-thread&thread_id=$1 [L,QSA]
  139. RewriteRule ^forums/new-reply/([^/]+)/?$ forums.php?view=new-reply&thread_id=$1 [L,QSA]
  140. RewriteRule ^forums/edit-reply/([^/]+)/?$ forums.php?view=edit-reply&reply_id=$1 [L,QSA]
  141. RewriteRule ^forums/thread/([^/]+)/([^/]+)/?$ forums.php?view=thread&thread_id=$1 [L,QSA]
  142. RewriteRule ^forums/([^/]+)/([^/]+)/?$ forums.php?view=forum&forum_id=$1 [L,QSA]
  143.  
  144. # Blogs
  145. RewriteRule ^articles/?$ index.php?view=articles [L,QSA]
  146. RewriteRule ^blogs/?$ blogs.php [L,QSA]
  147. RewriteRule ^blogs/new/?$ blogs.php?view=new [L,QSA]
  148. RewriteRule ^blogs/edit/([^/]+)/?$ blogs.php?view=edit&post_id=$1 [L,QSA]
  149. RewriteRule ^blogs/category/([^/]+)/([^/]+)/?$ blogs.php?view=category&category_id=$1 [L,QSA]
  150. RewriteRule ^blogs/([^/]+)/([^/]+)/?$ blogs.php?view=article&post_id=$1 [L,QSA]
  151.  
  152. # Market
  153. RewriteRule ^products/?$ index.php?view=products [L,QSA]
  154. RewriteRule ^market/?$ market.php [L,QSA]
  155. RewriteRule ^market/search/?$ market.php?view=search [L,QSA]
  156. RewriteRule ^market/search/([^/]+)/?$ market.php?view=search&query=$1 [L,QSA]
  157. RewriteRule ^market/search/([^/]+)/([^/]+)/?$ market.php?view=search&query=$1&page=$2 [L,QSA]
  158. RewriteRule ^market/category/([^/]+)/?$ market.php?view=category&category_id=$1 [L,QSA]
  159. RewriteRule ^market/category/([^/]+)/([^/]+)/?$ market.php?view=category&category_id=$1&category_url=$2 [L,QSA]
  160. RewriteRule ^market/category/([^/]+)/([^/]+)/([^/]+)/?$ market.php?view=category&category_id=$1&category_url=$2&page=$3 [L,QSA]
  161. RewriteRule ^market/([^/]+)/?$ market.php?page=$1 [L,QSA]
  162.  
  163. # Games
  164. RewriteRule ^games/?$ games.php [L,QSA]
  165. RewriteRule ^games/played/?$ games.php?view=played [L,QSA]
  166. RewriteRule ^games/([^/]+)/?$ game.php?id=$1 [L,QSA]
  167.  
  168. # Admin Panel
  169. RewriteRule ^admincp/?$ admin.php [L,QSA]
  170. RewriteRule ^admincp/([^/]+)/?$ admin.php?view=$1 [L,QSA]
  171. RewriteRule ^admincp/([^/]+)/([^/]+)/?$ admin.php?view=$1&sub_view=$2 [L,QSA]
  172. RewriteRule ^admincp/([^/]+)/([^/]+)/([^/]+)/?$ admin.php?view=$1&sub_view=$2&id=$3 [L,QSA]
  173.  
  174. # Profile
  175. RewriteRule ^([^/]+)/?$ profile.php?username=$1 [L,QSA]
  176. RewriteRule ^([^/]+)/([^/]+)/?$ profile.php?username=$1&view=$2 [L,QSA]
  177. RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ profile.php?username=$1&view=$2&id=$3 [L,QSA]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement