Advertisement
Guest User

An .htaccess

a guest
Oct 11th, 2018
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # BEGIN iThemes Security - Do not modify or remove this line
  2. # iThemes Security Config Details: 2
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5.  
  6. # Disable PHP in Uploads - Security > Settings > System Tweaks > Uploads
  7. RewriteRule ^blog/wp\-content/uploads/.*\.(?:php[1-6]?|pht|phtml?)$ - [NC,F]
  8. </IfModule>
  9. # END iThemes Security - Do not modify or remove this line
  10.  
  11. SetEnv PHP_VER 5
  12.  
  13. # Wp-supercache required edit:
  14. RewriteCond %{HTTP_user_agent} !^.*(2.0\ MMP|240x320|400X240|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|Googlebot-Mobile|hiptop|IEMobile|KYOCERA/WX310K|LG/U990|MIDP-2.|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|PlayStation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|SHG-i900|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|webOS|Windows\ CE|WinWAP|YahooSeeker/M1A1-R2D2|iPhone|iPod|Android|BlackBerry9530|LG-TU915\ Obigo|LGE\ VX|webOS|Nokia5800).*
  15. RewriteCond %{HTTP_user_agent} !^(w3c\ |w3c-|acs-|alav|alca|amoi|audi|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-|dang|doco|eric|hipt|htc_|inno|ipaq|ipod|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-|lg/u|maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|palm|pana|pant|phil|play|port|prox|qwap|sage|sams|sany|sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo|teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|wap-|wapa|wapi|wapp|wapr|webc|winw|winw|xda\ |xda-).*
  16.  
  17. # universal www canonicalization via htaccess
  18. # require www prefix for all urls of any domain - no editing required
  19. # http://perishablepress.com/press/2008/04/30/universal-www-canonicalization-via-htaccess/
  20. # RewriteEngine On
  21. # RewriteBase /
  22. # RewriteCond %{HTTP_HOST} !^www\. [NC]
  23. # RewriteCond %{HTTP_HOST} ^([^.]+\.[a-z]{2,6})$ [NC]
  24. # RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
  25.  
  26. # AND THE OPPOSITE IF NECESSARY
  27. # universal www canonicalization via htaccess
  28. # remove www prefix for all urls - replace all domain and tld with yours
  29. # https://perishablepress.com/press/2008/04/30/universal-www-canonicalization-via-htaccess/
  30. # RewriteEngine On
  31. # RewriteBase /
  32. # RewriteCond %{HTTP_HOST} !^domain\.tld$ [NC]
  33. # RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]
  34.  
  35. # BEGIN WPSuperCache
  36. # END WPSuperCache
  37.  
  38.  
  39. # BEGIN WordPress
  40. <IfModule mod_rewrite.c>
  41. RewriteEngine On
  42. RewriteBase /
  43. RewriteRule ^index\.php$ - [L]
  44. RewriteCond %{REQUEST_FILENAME} !-f
  45. RewriteCond %{REQUEST_FILENAME} !-d
  46. RewriteRule . /index.php [L]
  47. </IfModule>
  48.  
  49. # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement