saket555555

Untitled

Sep 13th, 2017
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. <IfModule mod_negotiation.c>
  3. Options -MultiViews
  4. </IfModule>
  5.  
  6. RewriteEngine On
  7. # This will enable the Rewrite capabilities
  8.  
  9. RewriteCond %{HTTPS} !=on
  10. # This checks to make sure the connection is not already HTTPS
  11.  
  12. RewriteRule ^/?(.*) https://%{SERVER_NAME}/mobile/$1 [R,L]
  13.  
  14.  
  15. # Redirect Trailing Slashes If Not A Folder...
  16. RewriteCond %{REQUEST_FILENAME} !-d
  17. RewriteRule ^(.*)/$ /$1 [L,R=301]
  18.  
  19. # Force SSL
  20. RewriteCond %{HTTPS} !=on
  21. RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  22.  
  23. # Handle Front Controller...
  24. RewriteCond %{REQUEST_FILENAME} !-d
  25. RewriteCond %{REQUEST_FILENAME} !-f
  26. RewriteRule ^ index.php [L]
  27.  
  28. # Handle Authorization Header
  29. RewriteCond %{HTTP:Authorization} .
  30. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  31.  
  32.  
  33.  
  34. </IfModule>
Add Comment
Please, Sign In to add comment