Witam.
Mam taki .htaccess:
  1.  
  2. Options +FollowSymLinks
  3. RewriteEngine on
  4. RewriteRule cache/ - [F]
  5. Options -Indexes
  6.  
  7. RewriteCond %{HTTP_HOST} ^www.domains.eu [NC]
  8. RewriteRule ^(.*)$ <a href="https://domains.eu/$1" target="_blank">https://domains.eu/$1</a> [L,R=301]
  9.  
  10. RewriteCond %{REQUEST_FILENAME} !-f
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteCond %{REQUEST_FILENAME} !-l
  13. RewriteRule ^([a-zA-Z0-9\-\_\/]*)$ index.php?p=$1
  14.  
  15.  
  16. # Blokada hotlinking czyli kradzieży obrazków
  17. RewriteCond %{HTTP_REFERER} !^https://(.+\.)?domains.pl/ [NC]
  18. RewriteCond %{HTTP_REFERER} !^$
  19. RewriteCond %{HTTP_REFERER} !google\. [NC]
  20. RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
  21. #RewriteRule .*\.(jpe?g|jpg|gif|bmp|png|jpeg)$ - [F]
  22.  
  23. #AuthType Basic
  24. #AuthName "Password Protected Area"
  25. #AuthUserFile /home/webplay/domains/domains.eu/public_html/.htpasswd
  26. #Require valid-user
  27.  
  28.  
  29.  
  30. # Prevent viewing of htaccess file.
  31. <Files .htaccess>
  32. order allow,deny
  33. deny from all
  34. </Files>
  35. RedirectMatch 403 ^.*/apps/(.*).php(.*)$
  36.  
  37. <ifModule mod_gzip.c>
  38. mod_gzip_on Yes
  39. mod_gzip_dechunk Yes
  40. mod_gzip_item_include file .(html?|txt|css|js|php|pl|map)$
  41. mod_gzip_item_include handler ^cgi-script$
  42. mod_gzip_item_include mime ^text/.*
  43. mod_gzip_item_include mime ^application/x-javascript.*
  44. mod_gzip_item_exclude mime ^image/.*
  45. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  46. </ifModule>



Potrzebuję następujące przekierowania:


- przekierowanie z http ://domains .pl, http ://www.domains .pl, https ://www.domains .pl, https ://domains .pl do https ://domains .eu

- przekierowanie z https ://www.domains .eu, http ://www.domains .pl, http ://domains .eu, do https ://domains .eu


W jaki sposób zrobić to w .htaccess ?

Ok, poradziłem sobie.

Rozwiązanie:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://domain.eu/$1 [L,R=301]