Advertisement
Ustim

Untitled

Jun 22nd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. # 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
  2.  
  3. # 2. In your opencart directory rename htaccess.txt to .htaccess.
  4.  
  5. # For any support issues please visit: http://www.opencart.com
  6.  
  7. #Options +SymLinksIfOwnerMatch
  8. Options +FollowSymlinks
  9.  
  10. # Prevent Directoy listing
  11. Options -Indexes
  12.  
  13. # Prevent Direct Access to files
  14. <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
  15. Require all denied
  16. ## For apache 2.2 and older, replace "Require all denied" with these two lines :
  17. # Order deny,allow
  18. # Deny from all
  19. </FilesMatch>
  20.  
  21. # SEO URL Settings
  22. RewriteEngine On
  23. # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
  24.  
  25. RewriteBase /
  26. # Delete Multi and One Slashed (Middle / End)
  27. RewriteCond %{HTTP_HOST} !=""
  28. RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR]
  29. RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$
  30.  
  31.  
  32. # Delete Last Slash
  33.  
  34. RewriteCond %{THE_REQUEST} //
  35.  
  36. RewriteRule .* /$0 [R=301,L]
  37.  
  38. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
  39.  
  40.  
  41. # www -> ssl non www
  42. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  43.  
  44.  
  45. # non ssl -> ssl
  46. RewriteCond %{HTTPS} off
  47. RewriteCond %{HTTP:X-Forwarded-Proto} !https
  48.  
  49.  
  50. RewriteCond %{REQUEST_FILENAME} !-d
  51. RewriteCond %{QUERY_STRING} ^(.+)/$
  52.  
  53.  
  54. RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
  55. RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
  56. RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
  57. RewriteCond %{REQUEST_FILENAME} !-f
  58. RewriteCond %{REQUEST_FILENAME} !-d
  59. RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
  60. RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  61.  
  62.  
  63. ### Additional Settings that may need to be enabled for some servers
  64. ### Uncomment the commands by removing the # sign in front of it.
  65. ### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.
  66.  
  67. # 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
  68. # php_flag register_globals off
  69.  
  70. # 2. If your cart has magic quotes enabled, This may work to disable it:
  71. # php_flag magic_quotes_gpc Off
  72.  
  73. # 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
  74. # php_value upload_max_filesize 999M
  75.  
  76. # 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
  77. # php_value post_max_size 999M
  78.  
  79. # 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
  80. # php_value max_execution_time 200
  81.  
  82. # 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
  83. # php_value max_input_time 200
  84.  
  85. # 7. disable open_basedir limitations
  86. # php_admin_value open_basedir none
  87.  
  88. ### Display PHP errors
  89. ### Uncomment the commands by removing the # sign in front of it.
  90. php_flag display_startup_errors on
  91. php_flag display_errors on
  92. php_flag html_errors on
  93. php_flag track_errors on
  94. php_value error_reporting "E_ALL"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement