.htaccess 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. #RewriteMap lc int:tolower
  2. ErrorDocument 403 /error/403.php
  3. ErrorDocument 404 /error/404.php
  4. ErrorDocument 500 /error/500.php
  5. #AddHandler application/x-httpd-php .xml
  6. #AddType application/x-httpd-php .xml
  7. AddType application/x-httpd-php .xml
  8. AddHandler php5-cgi .xml
  9. # <FilesMatch "\.php$">
  10. # Order allow, deny
  11. # Deny from all
  12. # </FilesMatch>
  13. Options +FollowSymlinks
  14. RewriteEngine on
  15. CheckSpelling on
  16. RewriteRule ^sitemap.xml$ /sitemap.php [NC]
  17. RewriteRule ^imgmap.xml$ /sitemap-image.php [NC]
  18. RewriteRule ^rss.xml$ /rss.php [NC]
  19. RewriteRule ^blog/buscar/([A-Za-z0-9]+)/([A-Za-z0-9]+)$ /blog/buscar.php?where=$1&query=$2 [NC]
  20. RewriteRule ^blog/buscar/([A-Za-z0-9]+)/([A-Za-z0-9]+)/$ /blog/buscar.php?where=$1&query=$2 [NC]
  21. RewriteRule ^blog/([A-Z\-a-z0-9]{3,}+)$ /blog/post.php?perm=$1 [NC]
  22. RewriteRule ^blog/([A-Z\-a-z0-9]{3,}+)/$ /blog/post.php?perm=$1 [NC]
  23. RewriteRule ^blog/([0-9]+)$ /blog/index.php?o=$1 [NC]
  24. RewriteRule ^blog/([0-9]+)/$ /blog/index.php?o=$1 [NC]
  25. RewriteRule ^lablanca/([0-9]+)$ /lablanca/index.php?year=$1 [NC]
  26. RewriteRule ^archivo/([A-Z\-a-z0-9]{3,}+)$ /archivo/index.php?file=$1 [NC]
  27. RewriteRule ^archivo/([A-Z\-a-z0-9]{3,}+)/$ /archivo/index.php?file=$1 [NC]
  28. RewriteRule ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)$ /actividades/buscar.php?where=$1&query=$2 [NC]
  29. RewriteRule ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)/$ /actividades/buscar.php?where=$1&query=$2 [NC]
  30. RewriteRule ^actividades/([A-Z\-a-z0-9{3,}]+)$ /actividades/actividad.php?perm=$1 [NC]
  31. RewriteRule ^actividades/([A-Z\-a-z0-9{3,}]+)/$ /actividades/actividad.php?perm=$1 [NC]
  32. RewriteRule ^actividades/([0-9]+)$ /actividades/index.php?o=$1 [NC]
  33. RewriteRule ^actividades/([0-9]+)/$ /actividades/index.php?o=$1 [NC]
  34. RewriteRule ^ayuda$ /ayuda/index.php [NC]
  35. RewriteRule ^ayuda/$ /ayuda/index.php [NC]
  36. RewriteRule ^galeria/upload$ /galeria/upload.php [NC]
  37. RewriteRule ^galeria/upload/$ /galeria/upload.php [NC]
  38. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)$ /galeria/album.php?perm=$1 [NC]
  39. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/$ /galeria/album.php?perm=$1 [NC]
  40. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/([A-Z\-a-z0-9{3,}]+)$ /galeria/photo.php?album=$2&perm=$1 [NC]
  41. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/([A-Z\-a-z0-9{3,}]+)/$ /galeria/photo.php?album=$2&perm=$1 [NC]
  42. #API redirections
  43. #TODO: This changes the url in the browser
  44. RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)$ /API/V$1/help/$2.php [NC,QSA,L]
  45. RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)/$ /API/V$1/help/$2.php [L,NC]
  46. #Force https TODO
  47. #RewriteCond %{HTTPS} !=on
  48. #RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  49. # BEGIN Cache-Control Headers
  50. <IfModule mod_expires.c>
  51. ExpiresActive on
  52. # ExpiresDefault "access plus 1 month"
  53. ExpiresByType application/javascript "access plus 6 days"
  54. ExpiresByType image/x-ico "access plus 12 days"
  55. ExpiresByType image/jpg "access plus 12 days"
  56. ExpiresByType image/jpeg "access plus 12 days"
  57. ExpiresByType image/gif "access plus 12 days"
  58. ExpiresByType image/png "access plus 12 days"
  59. ExpiresByType video/mkv "access plus 12 days"
  60. ExpiresByType text/css "access plus 6 days"
  61. ExpiresByType text/plain "access plus 6 days"
  62. </IfModule>
  63. # BEGIN Cache-Control Headers
  64. <ifModule mod_headers.c>
  65. <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
  66. Header set Cache-Control "max-age=864000, public, must-revalidate"
  67. </filesMatch>
  68. <filesMatch "\.(css)$">
  69. Header set Cache-Control "max-age=864000, public, must-revalidate"
  70. </filesMatch>
  71. <filesMatch "\.(js)$">
  72. Header set Cache-Control "max-age=864000, private, must-revalidate"
  73. </filesMatch>
  74. <filesMatch "\.(x?html?|php)$">
  75. Header set Cache-Control "max-age=86400, private, must-revalidate"
  76. </filesMatch>
  77. </ifModule>
  78. # END Cache-Control Headers
  79. <ifModule mod_deflate.c>
  80. AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  81. AddOutputFilterByType DEFLATE image/x-icon
  82. AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  83. AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  84. AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  85. AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  86. AddOutputFilterByType DEFLATE font/truetype font/opentype
  87. </ifModule>
  88. # Enable memory caching
  89. #CacheEnable mem /
  90. # Limit the size of the cache to 1 Megabyte
  91. #MCacheSize 1024
  92. #CacheFile footer.php toolbar.php img/*/* project/*/render/* project/*/render/*/preview/* project/*/render/*/miniature/*