Dup Goto 📝

.htaccess examples

To Pop
22 lines, 56 words, 432 chars Tuesday 2024-01-02 14:04:00

Force https

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

Rewriting

RewriteBase /tround/
RewriteRule "^([a-z]+)$" "tround.php?$1" [END]   

404

Note that path to error document must be absolute path relative to root.

ErrorDocument 404 /path/to/index.php

Anything else just returns the text given

ErrorDocument 404 <html><h1>Error</h1></html>