Guest User

Untitled

a guest
Nov 13th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName localhost
  3. ServerAdmin webmaster@localhost
  4. DocumentRoot /var/www/html/public
  5.  
  6. <Directory /var/www/html>
  7. AllowOverride All
  8. </Directory>
  9.  
  10. ErrorLog /dev/stderr
  11. TransferLog /dev/stdout
  12. RewriteEngine on
  13. RewriteCond %{HTTP_HOST} !=localhost
  14. RewriteCond %{HTTP_HOST} !=127.0.0.1
  15. RewriteCond %{REMOTE_ADDR} !=127.0.0.1
  16. RewriteCond %{REMOTE_ADDR} !=::1
  17. RewriteRule (.*) https://exampledomain.xy/$1 [L,R=301]
  18. </VirtualHost>
  19. <VirtualHost *:80>
  20. ServerAdmin webmaster@localhost
  21. DocumentRoot "/var/www/html/public"
  22. ServerName exampledomain.xy
  23. </VirtualHost>
  24.  
  25. <IfModule mod_rewrite.c>
  26. <IfModule mod_negotiation.c>
  27. Options -MultiViews
  28. </IfModule>
  29.  
  30. RewriteEngine On
  31.  
  32. # Redirect Trailing Slashes If Not A Folder...
  33. RewriteCond %{REQUEST_FILENAME} !-d
  34. RewriteRule ^(.*)/$ /$1 [L,R=301]
  35.  
  36. # Handle Front Controller...
  37. RewriteCond %{REQUEST_FILENAME} !-d
  38. RewriteCond %{REQUEST_FILENAME} !-f
  39. RewriteRule ^ index.php [L]
  40.  
  41. # Handle Authorization Header
  42. RewriteCond %{HTTP:Authorization} .
  43. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Add Comment
Please, Sign In to add comment