Guest User

Untitled

a guest
Apr 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2.  
  3. RewriteEngine On
  4.  
  5. RewriteCond %{HTTP_HOST} ^example.com$
  6. RewriteRule (.*) http://www.example.com/$1 [L,R=301]
  7.  
  8. # Removes index.php
  9. RewriteCond $1 !.(gif|jpe?g|png)$ [NC]
  10. RewriteCond %{REQUEST_FILENAME} !-f
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteRule ^(.*)$ /index.php/$1 [L]
  13.  
  14. </IfModule>
  15.  
  16. <IfModule mod_rewrite.c>
  17. RewriteEngine On
  18. RewriteBase /
  19.  
  20. # Removes index.php from ExpressionEngine URLs
  21. RewriteCond %{THE_REQUEST} ^GET.*index.php [NC]
  22. RewriteCond %{REQUEST_URI} !/system/.* [NC]
  23. RewriteRule (.*?)index.php/*(.*) /$1$2 [R=301,NE,L]
  24.  
  25. # Directs all EE web requests through the site index file
  26. RewriteCond %{REQUEST_FILENAME} !-f
  27. RewriteCond %{REQUEST_FILENAME} !-d
  28. RewriteRule ^(.*)$ /index.php/$1 [L]
  29. </IfModule>
  30.  
  31. RewriteCond %{HTTP_HOST} ^example.com$
  32. RewriteRule (.*) http://www.example.com/$1 [L,R=301]
  33.  
  34. # ----------------------------------------------------------------------
  35.  
  36. # Option 1:
  37. # Rewrite "www.domain.com -> domain.com"
  38.  
  39.  
  40. RewriteCond %{HTTPS} !=on
  41. RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
  42. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  43.  
  44.  
  45. #
Add Comment
Please, Sign In to add comment