Guest User

Untitled

a guest
Jan 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. / public_html
  2. / .htaccess
  3. / index.php
  4. / app.example.com
  5. / dashboard.php
  6.  
  7. # --------------------------------------------------------------------------------------------------------------------------------------
  8. # Stops people from being able to see htaccess file
  9.  
  10. <Files .htaccess>
  11. order allow,deny
  12. deny from all
  13. </Files>
  14.  
  15. # --------------------------------------------------------------------------------------------------------------------------------------
  16. # Options
  17.  
  18. Options All -Indexes +MultiViews
  19.  
  20. # --------------------------------------------------------------------------------------------------------------------------------------
  21. # Redirect app.example.com to /dashboard
  22.  
  23. RewriteEngine On
  24.  
  25. RewriteCond %{HTTP_HOST} ^app.example.com [NC]
  26. RewriteRule ^(.*)$ http://app.example.com/dashboard/$1 [L,R=301]
  27.  
  28. # --------------------------------------------------------------------------------------------------------------------------------------
  29. # Makes it so url can have slash at the end instead of .php extension
  30.  
  31. RewriteCond %{REQUEST_FILENAME} !-d
  32. RewriteCond %{DOCUMENT_ROOT}/$1.php -f
  33. RewriteRule ^(.+?)/?$ $1.php [L]
  34.  
  35. # --------------------------------------------------------------------------------------------------------------------------------------
  36. # Adds wwww to url if it doesnt already have it
  37.  
  38. RewriteCond %{HTTP_HOST} ^example.com [NC]
  39. RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
Add Comment
Please, Sign In to add comment