Log inRegister

Web server redirect & rewrite

General

  • redirect in .htaccess is te verkiezen boven refresh 0 in index.htm(l) header .
  • als je langer dan 0 seconden wilt wachten, kun je uiteraard wel een refresh gebruiken in de index.htm (zie vox mago)

DirectoryIndex order on a shared web server

.htaccess

verschil tss. 301 en 302

  • 301: permanente omleiding
  • 302: tijdelijke omleiding
  • (303: vervangend)

boossy.be

DirectAdmin > Uw Account > Subdomein-beheer (OK)

wiki.boossy.be

DirectAdmin > Geavanceerd > Site redirects (obsolete)

Dit was om de overgang te versoepelen van subdirectory naar subdomain.
Lokaal Path Type Redirect URL
/foswiki 302 http://wiki.boossy.be/bin/view/Boossy/WebHome
/twiki 302 http://wiki.boossy.be/bin/view/Boossy

.htaccess (obsolete)

Dit was om direct op de WebHome van Boossy terecht te komen, en niet op die van het Main web.
Redirect /foswiki http://wiki.boossy.be/bin/view/Boossy/WebHome

Na de overschakeling op short URLs deze doorverwijzing gedaan via de !HomePagePlugin van Foswiki.

Zie FwIssues#Solution

index.htm

<head profile="http://gmpg.org/xfn/11">
   ...
   <meta http-equiv="Expires" content="-1" />
   ...
</head

voxmago.be

.htaccess

empty file

index.shtml

<head>
   ...
   <meta http-equiv="Expires" content="-1" />
   <meta http-equiv="refresh" content="0;URL=intro.html?v=2018.10.02.13.00" />
   <title>VOX MAGO</title>
</head>

intro.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl-nl" lang="nl-nl">
   <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
   <meta http-equiv="refresh" content="10;URL=drupal" />
<head>

.../drupal/.htaccess & .../drupal/index.php

default (Drupal) files

kwamarant.be

.htaccess

Redirect 301 /index.php/component/content/featured /
Redirect 301 /index.php?option=com_content&view=featured /
Redirect 301 /index.php/component/search/ /

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Redirects

Bij de zoekresultaten van Google krijg je voor "kwamarant" ook twee geïndenteerde sublinks/sitelinks te zien. Als je daarop klikt, krijg je de site wel te zien, maar de navigatie via de knoppen en het menu mislukt.

Oplossing: .htaccess met permanente redirects.

Rewrites: van www naar niet-www

Vereist omdat de PHPJabbers Event Booking Calendar anders als een grijs vlak wordt weergegeven. Door alle verkeer via de .htaccess af te leiden van www naar niet-www, wordt het probleem verholpen.

index.php

default (Joomla!) file

kunststudio-livingart.be

.htaccess

Redirect 301 /index.php/component/content/featured /

zie kwamarant

index.php

default (Joomla!) file

muzitaal.be

no .htaccess file

index.html

<head>
   ...
   <meta http-equiv="Expires" content="-1" />
   <meta http-equiv="refresh" content="0;URL=drupal/index.php?v=2019.01.14.16.27" />
   <title>MuziTaal</title>
 </head>

.../drupal/.htaccess: rewrites van niet-www naar www

Changes compared to the default .htaccess:

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteBase /drupal

Op de www-variant werkt het mobiele menu wel, op de niet www-variant niet!

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This page was cached on 15 May 2023 - 22:11.