AuthGroupFile /dev/null AuthName "cms" AuthType Basic AuthUserFile /home/admin/domains/site-preview.nl/.htpasswd/public_html/cms/.htpasswd require valid-user Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !^/uploads.* # 301 Redirect all requests that don't contain a dot or trailing slash to # include a trailing slash RewriteCond %{REQUEST_URI} !/$ RewriteCond %{REQUEST_URI} !\. RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L] # Rewrites urls in the form of /parent/child/ # but only rewrites if the requested URL is not a file or directory RewriteCond %{REQUEST_FILENAME} !-f [NC] RewriteCond %{REQUEST_FILENAME} !-d [NC] RewriteRule ^(.+)$ index.php?page=$1 [QSA]