arivera12/cbooks/master/.htaccess - Htaccess File

arivera12/cbooks/master/.htaccess

#Options +FollowSymLinks -MultiViews
#Options -Indexes
#AcceptPathInfo Off
#RewriteEngine on
#RewriteBase   /

#ErrorDocument 404 http://mysite.co.uk/404page/404.html

#RewriteCond %{HTTP:X-Forwarded-Proto} !https  
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]  

#take off index.html
#RewriteCond %{HTTP_HOST} !^www. [NC]
#RewriteCond %{REQUEST_URI} ^(.*/)index.html$ [NC]
#RewriteRule . http://www.%{HTTP_HOST}%1 [R=301,NE,L]

## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).php [NC]
#RewriteRule ^ %1 [R,L,NC]

## To internally redirect /dir/foo to /dir/foo.php
#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule ^ %{REQUEST_URI}.php [L]    

## hide .html extension
# To externally redirect /dir/foo.html to /dir/foo
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).html [NC]
#RewriteRule ^ %1 [R,L,NC]

## To internally redirect /dir/foo to /dir/foo.html
#RewriteCond %{REQUEST_FILENAME}.html -f
#RewriteRule ^ %{REQUEST_URI}.html [L]

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_FILENAME, REQUEST_URI, THE_REQUEST, X-Forwarded-Proto

Comments

Apache