Guest User

.htaccess file

a guest
Oct 29th, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.14 KB | None | 0 0
  1. ##
  2. # @package    Joomla
  3. # @copyright  Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.
  4. # @license    GNU General Public License version 2 or later; see LICENSE.txt
  5. ##
  6.  
  7. ##
  8. # OTHER SERVER STUFF
  9. ##
  10. #suPHP_ConfigPath /home/wlte2016
  11.  
  12. ##
  13. # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
  14. #
  15. # The line just below this section: 'Options +FollowSymLinks' may cause problems
  16. # with some server configurations.  It is required for use of mod_rewrite, but may already
  17. # be set by your server administrator in a way that disallows changing it in
  18. # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
  19. # beginning of line), reload your site in your browser and test your sef url's.  If they work,
  20. # it has been set by your server administrator and you do not need it set here.
  21. ##
  22.  
  23. ## No directory listings
  24. IndexIgnore *
  25.  
  26. ## Can be commented out if causes errors, see notes above.
  27. #Options +FollowSymlinks
  28. Options -Indexes
  29.  
  30. ## Mod_rewrite in use.
  31.  
  32. RewriteEngine On
  33.  
  34. ## Begin - Rewrite rules to block out some common exploits.
  35. # If you experience problems on your site block out the operations listed below
  36. # This attempts to block the most common type of exploit `attempts` to Joomla!
  37. #
  38. # Block out any script trying to base64_encode data within the URL.
  39. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
  40. # Block out any script that includes a <script> tag in URL.
  41. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  42. # Block out any script trying to set a PHP GLOBALS variable via URL.
  43. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  44. # Block out any script trying to modify a _REQUEST variable via URL.
  45. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  46. # Return 403 Forbidden header and show the content of the root homepage
  47. RewriteRule .* index.php [F]
  48. #
  49. ## End - Rewrite rules to block out some common exploits.
  50.  
  51. ## Begin - Custom redirects
  52. #
  53. # If you need to redirect some pages, or set a canonical non-www to
  54. # www redirect (or vice versa), place that code here. Ensure those
  55. # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
  56. #
  57. RewriteRule ^(.+)\/exercise\/(.+) $1/$2 [NC,R=301,L]
  58.  
  59. ## End - Custom redirects
  60.  
  61. ## Begin - Force HTTPS
  62. #
  63. RewriteEngine On
  64. RewriteCond %{HTTPS} OFF
  65. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  66. #
  67. ## End - Force HTTPS
  68.  
  69. ##
  70. # Uncomment following line if your webserver's URL
  71. # is not directly related to physical file paths.
  72. # Update Your Joomla! Directory (just / for root).
  73. ##
  74.  
  75. # RewriteBase /
  76.  
  77. ## Begin - Joomla! core SEF Section.
  78. #
  79. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  80. #
  81. # If the requested path and file is not /index.php and the request
  82. # has not already been internally rewritten to the index.php script
  83. RewriteCond %{REQUEST_URI} !^/index\.php
  84. # and the requested path and file doesn't directly match a physical file
  85. RewriteCond %{REQUEST_FILENAME} !-f
  86. # and the requested path and file doesn't directly match a physical folder
  87. RewriteCond %{REQUEST_FILENAME} !-d
  88. # internally rewrite the request to the index.php script
  89. RewriteRule .* index.php [L]
  90. #
  91. ## End - Joomla! core SEF Section.
  92.  
  93. ## Begin - Redirects for changed urls
  94. #
  95. RedirectMatch 301 /en/ep-free-english-graded-reading-comprehension/ep-(.*)$ https://www.weloveteachingenglish.com/en/free-english-graded-reading-comprehension/$1
  96. RedirectMatch 301 /es/ep-lectura-graduada-ingles-gratis/ep-(.*)$ https://www.weloveteachingenglish.com/es/lectura-graduada-ingles-gratis/$1
  97. RedirectMatch 301 /it/ep-letture-graduate-gratuite-in-inglese/ep-(.*)$ https://www.weloveteachingenglish.com/it/letture-graduate-gratuite-in-inglese/$1
  98.  
  99. RedirectMatch 301 /en/free-english-graded-reading-comprehension/ep-(.*)$ https://www.weloveteachingenglish.com/en/free-english-graded-reading-comprehension/$1
  100. RedirectMatch 301 /es/lectura-graduada-ingles-gratis/ep-(.*)$ https://www.weloveteachingenglish.com/es/lectura-graduada-ingles-gratis/$1
  101. RedirectMatch 301 /it/letture-graduate-gratuite-in-inglese/ep-(.*)$ https://www.weloveteachingenglish.com/it/letture-graduate-gratuite-in-inglese/$1
  102.  
  103. RedirectMatch 301 /en/ep-(.*) https://www.weloveteachingenglish.com/en/$1
  104. RedirectMatch 301 /es/ep-(.*) https://www.weloveteachingenglish.com/es/$1
  105. RedirectMatch 301 /it/ep-(.*) https://www.weloveteachingenglish.com/it/$1
  106.  
  107.  
  108. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-inicial-para-aprender-ingles/(.*) https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-inicial/$1
  109. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-inicial-para-aprender-ingles https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-inicial
  110. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-inicial-ingles/(.*) https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-inicial/$1
  111. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-inicial-ingles https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-inicial
  112. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-intermedio-para-aprender-ingles/(.*) https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-intermedio/$1
  113. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/nivel-intermedio-para-aprender-ingles https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-intermedio
  114. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/avanzado-para-aprender-ingles/(.*) https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-avanzado/$1
  115. RedirectMatch 301 es/lecciones-gratis-para-aprender-ingles/avanzado-para-aprender-ingles https://www.weloveteachingenglish.com/es/lecciones-gratis-para-aprender-ingles/nivel-avanzado
  116.  
  117. #
  118. ## End - Redirects for changed urls
  119.  
  120. # php -- BEGIN cPanel-generated handler, do not edit
  121. # Set the “ea-php70” package as the default “PHP” programming language.
  122. <IfModule mime_module>
  123.   AddType application/x-httpd-ea-php70 .php .php7 .phtml
  124. </IfModule>
  125. # php -- END cPanel-generated handler, do not edit
Advertisement
Add Comment
Please, Sign In to add comment