Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. RewriteEngine On
  2. RewriteCond %{REQUEST_FILENAME} !-d
  3. RewriteCond %{REQUEST_FILENAME} !-f
  4. RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  5.  
  6. RewriteCond %{HTTPS} !on [OR]
  7. RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
  8. RewriteRule ^ https://www.mydomain.com%{REQUEST_URI} [R=301]
  9.  
  10. RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  11.  
  12. RewriteRule ^(.*)$ index.php [QSA,L]
  13.  
  14. RewriteCond %{HTTP_HOST} ^mydomain.com
  15. RewriteRule (.*) https://www.mydomain.com/$1 [R=301,L]
  16.  
  17. RewriteCond %{HTTPS} !on
  18. RewriteRule (.*) https://www.mydomain.com/$1 [R=301,L]
  19.  
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteCond %{REQUEST_FILENAME} !-f
  22. RewriteRule ^(.*)$ index.php [QSA,L]
  23.  
  24. RewriteEngine On
  25.  
  26. # force https and www.
  27. RewriteCond %{HTTPS} !on [OR]
  28. RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
  29. RewriteRule ^ https://www.mydomain.com%{REQUEST_URI} [R=301,L]
  30.  
  31. # route all requests for non-existing resources to CakePHP
  32. RewriteCond %{REQUEST_FILENAME} !-d
  33. RewriteCond %{REQUEST_FILENAME} !-f
  34. RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
  35.  
  36. <IfModule mod_rewrite.c>
  37. RewriteEngine On
  38. RewriteBase /
  39. RewriteCond %{HTTPS} !on
  40. RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
  41. RewriteCond %{REQUEST_FILENAME} !-d
  42. RewriteCond %{REQUEST_FILENAME} !-f
  43. RewriteRule ^(.*)$ index.php [QSA,L]
  44. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement