.htaccess: Difference between revisions
Jump to navigation
Jump to search
No edit summary (change visibility) |
No edit summary (change visibility) |
||
Line 21: | Line 21: | ||
AuthName "This page needs authentication" | AuthName "This page needs authentication" | ||
require valid-user | require valid-user | ||
</syntaxhighlight> | |||
= redirect to https = | |||
<syntaxhighlight language="text"> | |||
RewriteEngine On | |||
RewriteCond %{SERVER_PORT} 80 | |||
RewriteRule ^(.*)$ https://mendelonline.be/$1 [R,L] | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 23:44, 21 August 2020
apache's config file
redirects
Redirect /file.exe https://facebook.com/file.exe
Redirect 301 /file.exe /file/file.exe
directory browsing
Options +Indexes
IndexOptions +FancyIndexing
Satisfy Any
password protecting
AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /somedirectory/public_html/somedirectory/.htpasswd
AuthName "This page needs authentication"
require valid-user
redirect to https
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mendelonline.be/$1 [R,L]