Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. Options +FollowSymLinks
  2.  
  3. RewriteEngine On
  4.  
  5. # HTTPS (not working: ERR_TOO_MANY_REDIRECTS)
  6. RewriteCond %{HTTPS} off
  7. RewriteRule .? https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L]
  8.  
  9. # Capture Global Request
  10. # RewriteCond %{THE_REQUEST} \S+\s+(\S*)
  11. # RewriteRule ^ - [E=REQ:%1]
  12.  
  13. # Subdomain 1 (folder sql-admin)
  14. RewriteCond %{HTTP_HOST} ^sql-admin\.z3nth10n\.net$ [NC]
  15. RewriteCond %{REQUEST_URI} !^/phpmyadmin/.*$
  16. RewriteRule !^phpmyadmin/ /phpmyadmin%{REQUEST_URI} [L]
  17.  
  18. # Subdomain 2 (folder api)
  19. RewriteCond %{HTTP_HOST} ^api\.z3nth10n\.net$ [NC]
  20. RewriteCond %{REQUEST_URI} !^/api/.*$
  21. RewriteRule !^api/ /api%{REQUEST_URI} [L]
  22.  
  23. # Subdomain 3 (folder dev)
  24. RewriteCond %{HTTP_HOST} ^dev\.z3nth10n\.net$ [NC]
  25. RewriteCond %{REQUEST_URI} !^/dev/.*$
  26. RewriteRule !^dev/ /dev%{REQUEST_URI} [L]
  27.  
  28. # Avoid trailing slash from Apache
  29. # Redirects a folder path to end in /
  30. # DirectorySlash off
  31. # RewriteCond %{REQUEST_FILENAME} -d
  32. # RewriteRule (?>.*)(?<!/) %{ENV:REQ}/ [L,DPI,R]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement