Advertisement
Guest User

.htaccess

a guest
Aug 27th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.25 KB | None | 0 0
  1. # MODX supports Friendly URLs via this .htaccess file. You must serve web
  2. # pages via Apache with mod_rewrite to use this functionality, and you must
  3. # change the file name from ht.access to .htaccess.
  4. #
  5. # Make sure RewriteBase points to the directory where you installed MODX.
  6. # E.g., "/modx" if your installation is in a "modx" subdirectory.
  7. #
  8. # You may choose to make your URLs non-case-sensitive by adding a NC directive
  9. # to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
  10.  
  11. Options +FollowSymlinks
  12. RewriteEngine On
  13. RewriteBase /
  14.  
  15. # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
  16. RewriteCond %{HTTP_HOST} .
  17. RewriteCond %{HTTP_HOST} !^zip-da\.ru [NC]
  18. RewriteRule (.*) http://zip-da.ru/$1 [R=301,L]
  19.  
  20. # or for the opposite domain.com -> www.domain.com use the following
  21. # DO NOT USE BOTH
  22. #
  23. #RewriteCond %{HTTP_HOST} .
  24. #RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
  25. #RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
  26.  
  27.  
  28.  
  29. # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
  30. # https://www.domain.com when your cert only allows https://secure.domain.com
  31. #RewriteCond %{SERVER_PORT} !^443
  32. #RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]
  33.  
  34.  
  35.  
  36.  
  37. # The Friendly URLs part
  38. RewriteCond %{REQUEST_FILENAME} !-f
  39. RewriteCond %{REQUEST_FILENAME} !-d
  40. #RewriteRule ^(.*)$ index.php [L,QSA]
  41. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  42.  
  43.  
  44.  
  45. # Make sure .htc files are served with the proper MIME type, which is critical
  46. # for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
  47.  
  48. #AddType text/x-component .htc
  49.  
  50.  
  51.  
  52. # If your server is not already configured as such, the following directive
  53. # should be uncommented in order to set PHP's register_globals option to OFF.
  54. # This closes a major security hole that is abused by most XSS (cross-site
  55. # scripting) attacks. For more information: http://php.net/register_globals
  56. #
  57. # To verify that this option has been set to OFF, open the Manager and choose
  58. # Reports -> System Info and then click the phpinfo() link. Do a Find on Page
  59. # for "register_globals". The Local Value should be OFF. If the Master Value
  60. # is OFF then you do not need this directive here.
  61. #
  62. # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
  63. #
  64. # Your server does not allow PHP directives to be set via .htaccess. In that
  65. # case you must make this change in your php.ini file instead. If you are
  66. # using a commercial web host, contact the administrators for assistance in
  67. # doing this. Not all servers allow local php.ini files, and they should
  68. # include all PHP configurations (not just this one), or you will effectively
  69. # reset everything to PHP defaults. Consult www.php.net for more detailed
  70. # information about setting PHP directives.
  71.  
  72. php_flag register_globals Off
  73.  
  74.  
  75.  
  76. # For servers that support output compression, you should pick up a bit of
  77. # speed by un-commenting the following lines.
  78.  
  79. #php_flag zlib.output_compression On
  80. #php_value zlib.output_compression_level 5
  81.  
  82.  
  83.  
  84. # The following directives stop screen flicker in IE on CSS rollovers. If
  85. # needed, un-comment the following rules. When they're in place, you may have
  86. # to do a force-refresh in order to see changes in your designs.
  87.  
  88. #ExpiresActive On
  89. #ExpiresByType image/gif A2592000
  90. #ExpiresByType image/jpeg A2592000
  91. #ExpiresByType image/png A2592000
  92. #BrowserMatch "MSIE" brokenvary=1
  93. #BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
  94. #BrowserMatch "Opera" !brokenvary
  95. #SetEnvIf brokenvary 1 force-no-vary
  96.  
  97.  
  98. Redirect 301 /catalogue/запчасти-для-крупной-бытовой-техники.html http://zip-da.ru/catalogue/zapchasti-dlya-krupnoj-byitovoj-texniki.html?
  99. Redirect 301 /catalogue/комплектующие-для-отопления.html http://zip-da.ru/catalogue/komplektuyushhie-dlya-otopleniya.html?
  100. Redirect 301 /catalogue/электротепловое-оборудование.html http://zip-da.ru/catalogue/elektroteplovoe-oborudovanie.html?
  101. Redirect 301 /catalogue/запчасти-для-крупной-бытовой-техники/запчасти-для-холодильника/вентиляторы.html http://zip-da.ru/catalogue/zapchasti-dlya-krupnoj-byitovoj-texniki/41/ventilyatoryi.html?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement