Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- / public_html
- / .htaccess
- / index.php
- / app.example.com
- / dashboard.php
- # --------------------------------------------------------------------------------------------------------------------------------------
- # Stops people from being able to see htaccess file
- <Files .htaccess>
- order allow,deny
- deny from all
- </Files>
- # --------------------------------------------------------------------------------------------------------------------------------------
- # Options
- Options All -Indexes +MultiViews
- # --------------------------------------------------------------------------------------------------------------------------------------
- # Redirect app.example.com to /dashboard
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^app.example.com [NC]
- RewriteRule ^(.*)$ http://app.example.com/dashboard/$1 [L,R=301]
- # --------------------------------------------------------------------------------------------------------------------------------------
- # Makes it so url can have slash at the end instead of .php extension
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteCond %{DOCUMENT_ROOT}/$1.php -f
- RewriteRule ^(.+?)/?$ $1.php [L]
- # --------------------------------------------------------------------------------------------------------------------------------------
- # Adds wwww to url if it doesnt already have it
- RewriteCond %{HTTP_HOST} ^example.com [NC]
- RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
Add Comment
Please, Sign In to add comment