.htaccess 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)$ /actividades/buscar.php?where=$1&query=$2 [NC]
  27. RewriteRule ^actividades/search/([A-Za-z0-9]+)/([A-Za-z0-9]+)/$ /actividades/buscar.php?where=$1&query=$2 [NC]
  28. RewriteRule ^actividades/([A-Z\-a-z0-9{3,}]+)$ /actividades/actividad.php?perm=$1 [NC]
  29. RewriteRule ^actividades/([A-Z\-a-z0-9{3,}]+)/$ /actividades/actividad.php?perm=$1 [NC]
  30. RewriteRule ^actividades/([0-9]+)$ /actividades/index.php?o=$1 [NC]
  31. RewriteRule ^actividades/([0-9]+)/$ /actividades/index.php?o=$1 [NC]
  32. RewriteRule ^ayuda$ /ayuda/index.php [NC]
  33. RewriteRule ^ayuda/$ /ayuda/index.php [NC]
  34. RewriteRule ^galeria/upload$ /galeria/upload.php [NC]
  35. RewriteRule ^galeria/upload/$ /galeria/upload.php [NC]
  36. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)$ /galeria/album.php?perm=$1 [NC]
  37. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/$ /galeria/album.php?perm=$1 [NC]
  38. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/([A-Z\-a-z0-9{3,}]+)$ /galeria/photo.php?album=$2&perm=$1 [NC]
  39. RewriteRule ^galeria/([A-Z\-a-z0-9{3,}]+)/([A-Z\-a-z0-9{3,}]+)/$ /galeria/photo.php?album=$2&perm=$1 [NC]
  40. #API redirections
  41. #TODO: This changes the url in the browser
  42. RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)$ /API/V$1/help/$2.php [NC,QSA,L]
  43. RewriteRule ^API/V([{0-9}]+)/help/([A-Z\-a-z0-9{3,}]+)/$ /API/V$1/help/$2.php [L,NC]
  44. #Force https TODO
  45. #RewriteCond %{HTTPS} !=on
  46. #RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
  47. # BEGIN Cache-Control Headers
  48. <IfModule mod_expires.c>
  49. ExpiresActive on
  50. # ExpiresDefault "access plus 1 month"
  51. ExpiresByType application/javascript "access plus 6 days"
  52. ExpiresByType image/x-ico "access plus 12 days"
  53. ExpiresByType image/jpg "access plus 12 days"
  54. ExpiresByType image/jpeg "access plus 12 days"
  55. ExpiresByType image/gif "access plus 12 days"
  56. ExpiresByType image/png "access plus 12 days"
  57. ExpiresByType video/mkv "access plus 12 days"
  58. ExpiresByType text/css "access plus 6 days"
  59. ExpiresByType text/plain "access plus 6 days"
  60. </IfModule>
  61. # BEGIN Cache-Control Headers
  62. <ifModule mod_headers.c>
  63. <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
  64. Header set Cache-Control "max-age=864000, public, must-revalidate"
  65. </filesMatch>
  66. <filesMatch "\.(css)$">
  67. Header set Cache-Control "max-age=864000, public, must-revalidate"
  68. </filesMatch>
  69. <filesMatch "\.(js)$">
  70. Header set Cache-Control "max-age=864000, private, must-revalidate"
  71. </filesMatch>
  72. <filesMatch "\.(x?html?|php)$">
  73. Header set Cache-Control "max-age=86400, private, must-revalidate"
  74. </filesMatch>
  75. </ifModule>
  76. # END Cache-Control Headers
  77. <ifModule mod_deflate.c>
  78. AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  79. AddOutputFilterByType DEFLATE image/x-icon
  80. AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  81. AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  82. AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  83. AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  84. AddOutputFilterByType DEFLATE font/truetype font/opentype
  85. </ifModule>
  86. # Enable memory caching
  87. #CacheEnable mem /
  88. # Limit the size of the cache to 1 Megabyte
  89. #MCacheSize 1024
  90. #CacheFile footer.php toolbar.php img/*/* project/*/render/* project/*/render/*/preview/* project/*/render/*/miniature/*