# If no status argument is given, the redirect will be "temporary" (HTTP status 302). # # 301 -eq permanent # 302 -eq temp - https://de.wikipedia.org/wiki/URL-Hijacking # 303 -eq seeother - Der Browser soll mit einem GET folgen, auch wenn der ursprüngliche Request ein POST war. # 307 "Temporary Redirect" Der Browser soll mit derselben Methode folgen wie beim ursprünglichen Request (d. h. einem POST folgt ein POST). # 410 -eq gone - The resource has been permanently removed. # ### Missing Features # --- Apache 2.4 only: Apache 2.2 results w/ 500 Internal Server Error --- # core: directive # mod_rewrite: END,QSD flags # # --- Apache 2.2 --- # core: directive (results w/ 500 Internal Server Error) # mod_env: SetEnv directive # mod_rewrite: E,NE,S flags # mod_alias: Alias directive (results w/ 500 Internal Server Error) ### SetOutputFilter DEFLATE ## # Rewrite directives take precedende over Redirect directives # Rewrite directives inside a Location take precedence over Rewrite directives with an (external?) URL-path. RewriteEngine On #RewriteRule ^de/HOWTO/Asus-Eee-PC-1000HE(.*)$ /de/HOWTO/ASUS-Eee-PC-1000HE$1 [R=301,L] #RewriteRule ^include/0ffSite/IMG_20171028_152759315_544x408.jpg$ /include/0ffSite/IMG_20171028_152759315_544×408.jpg [R=307,L] # Force DE locale... substitues RedirectMatch (due to processing order reasons) RewriteCond %{QUERY_STRING} ^$ RewriteRule ^(index\.html?)?$ https://www.rollator-parcours.com/de/ [R=307,S=5,L] # Remove index.html? file name... if at the end RewriteCond %{DOCUMENT_ROOT}$1 -d RewriteCond %{QUERY_STRING} ^$ RewriteRule ^(.*/)?index\.html?$ https://www.rollator-parcours.com/$1 [R=301,S=4,L] # Trim //+ multiple slash URI... inherent Rewrite feature # %{REQUEST_URI} /{2,}? fails due to an unproper version of the original request RewriteCond %{THE_REQUEST} ^(GET|POST|[A-Z]{3,}+)\s(?>.*?/{2,}+).*(?<=\sHTTP/) # Fix CodeMirror editor issue: > #RewriteCond %{REQUEST_FILENAME} -h [OR] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{QUERY_STRING} ^$ RewriteRule .* https://www.rollator-parcours.com/$0 [R=301,S=3,L] # Force HTTPS... if not already (default HTTP Port 80, HTTPS Port 443) ##RewriteCond %{SERVER_PORT} 80 # !=on without "" quotation marks RewriteCond %{HTTPS} !=on [OR] # Force WWW subdomain... if not already RewriteCond %{HTTP_HOST} !^www\.rollator-parcours\.com$ # Skip this if the Firewall gets triggered anyway #RewriteCond %{REQUEST_FILENAME} -h [OR] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{QUERY_STRING} ^$ RewriteRule .* https://www.rollator-parcours.com/$0 [R=301,S=2,L] # Firewall: Bounce back most invalid requests !!! this takes precedence over Redirect directives #RewriteCond %{REQUEST_FILENAME} !-h RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{HTTP_HOST} !^localhost$ RewriteRule .* http://localhost/$0 [R=302,NE,L] # Firewall: Bounce back whatever query requests !!! this takes precedence over Redirect directives RewriteCond %{QUERY_STRING} !^$ RewriteCond %{HTTP_HOST} !^localhost$ RewriteRule .* http://localhost/$0 [R=302,NE,L] ## # Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in the configuration file. # Redirect directives inside a Location take precedence over Redirect and Alias directives with an URL-path. #RedirectMatch 307 ^/test-htaccess /RedirectMatch #RedirectMatch 307 ^/$ /de/ #Redirect 301 /de/HOWTO/Asus-Eee-PC-1000HE /de/HOWTO/ASUS-Eee-PC-1000HE ## # Alias may only be used in server or virtualhost context, and not in a .htaccess file. # # # AllowOverride FileInfo # #Alias /~uh %{DOCUMENT_ROOT}../ftp/home/uh/www