Advertisement
Guest User

Untitled

a guest
Feb 14th, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. .htaccess file:
  2.  
  3. php_flag display_errors off
  4.  
  5. # This controls what config options to use.
  6. # SetEnv RELEASE_MODE DEV
  7.  
  8. RewriteEngine On
  9. http://reim.altervista.org = /
  10.  
  11. # These are the real folders.
  12. RewriteRule ^resources/(.*)$ resources/$1 [L]
  13. RewriteRule ^docs/(.*)$ docs/$1 [L]
  14.  
  15. # Specific, prettier URLs.
  16. RewriteRule ^profile/([0-9]+) index.php?page_slug=profile&user_id=$1 [NC,L]
  17. RewriteRule ^pet/([0-9]+) index.php?page_slug=pet&pet_id=$1 [NC,L]
  18. RewriteRule ^edit-pet/([0-9]+) index.php?page_slug=edit-pet&pet_id=$1 [NC,L]
  19. RewriteRule ^shop/([0-9]+) index.php?page_slug=shop&shop_id=$1 [NC,L]
  20. RewriteRule ^notice/([0-9]+) index.php?page_slug=notice&state=jump&notification_id=$1 [NC,L]
  21.  
  22. # Pagination for /items/ - /items is still handled by the catch-all, etc.
  23. RewriteRule ^items/([0-9]+) index.php?page_slug=items&page=$1 [NC,L]
  24. RewriteRule ^news/([0-9]+) index.php?page_slug=news&page=$1 [NC,L]
  25. RewriteRule ^crafting/([0-9]+) index.php?page_slug=crafting&page=$1 [NC,L]
  26.  
  27. # Messages - first pagination. Then we have two URLs mapped to our write-new
  28. # slug - /write-new-message/ and /write-message-reply/. -new accepts a user ID,
  29. # and -reply takes a message ID. Slick.
  30. RewriteRule ^messages/([0-9]+) index.php?page_slug=messages&page=$1 [NC,L]
  31. RewriteRule ^write-new-message(/([0-9]+))? index.php?page_slug=write-message&to_user_id=$2 [NC,L]
  32. RewriteRule ^write-message-reply(/([0-9]+))?(/(all))? index.php?page_slug=write-message&reply_to_id=$2&reply_to_all=$4 [NC,L]
  33. RewriteRule ^message/([0-9]+) index.php?page_slug=message&message_id=$1 [NC,L]
  34.  
  35. # The boards need to support both a 'nice' URL (/thread/1) AND a page number
  36. # on that URL (/thread/1/2/).
  37. RewriteRule ^threads/([0-9]+)(/([0-9]+))? index.php?page_slug=threads&board_id=$1&page=$3 [NC,L]
  38. RewriteRule ^thread/([0-9]+)(/([0-9]+))? index.php?page_slug=thread&thread_id=$1&page=$3 [NC,L]
  39. RewriteRule ^edit-post/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-post&post_id=$1&page=$3 [NC,L]
  40. RewriteRule ^edit-thread/([0-9]+)(/([0-9]+))? index.php?page_slug=edit-thread&thread_id=$1&page=$3 [NC,L]
  41.  
  42. # Search page rules.
  43. RewriteRule ^search/([a-z0-9]+)(((/([^/]+))(/(exact|contains)?)(/([0-9])+)?))? index.php?page_slug=search&state=search&search=$1&term=$5&page=$9&precision=$7 [NC,L]
  44.  
  45. # Craft things.
  46. RewriteRule ^craft/([0-9]+) index.php?page_slug=craft&id=$1 [NC,L]
  47.  
  48. # Gotta catch 'em all! Don't put any rules below this one.
  49. RewriteRule ^([A-Z0-9-]+)(/(.*))?$ index.php?page_slug=$1 [QSA,NC,L]
  50.  
  51. ----------------------------------
  52.  
  53. My apache directives in AlterVista for the .htaccess file:
  54.  
  55. RewriteEngine On
  56. RewriteBase /
  57. RewriteCond %{REQUEST_FILENAME} !-f
  58. RewriteCond %{REQUEST_FILENAME} !-d
  59. RewriteCond %{REQUEST_URI} !\.(js|css|gif|jpg|png|ico)$ [NC]
  60. RewriteRule ^(.*)$ index.php [QSA,L]
  61. RewriteRule ^get/([0-9]+).gif$ /click/siggy/$1 [L]
  62. # # av:php5-engine
  63. AddHandler av-php56 .php
  64. php_flag display_errors off
  65.  
  66. # # av:Toolbar
  67. SetEnv AV_TOOLBAR 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement