Het probleem is dat deze redirect niet werkt als een gebruiker de website op http://domein.nl (zonder www) bezoekt. Hoe kan ik in beide situaties (zonder, en met www) doorsturen naar http://domein.nl/frontend?
"in je virtual host toevoegen;" < hoe werkt dit? Ik denk dat ik daar geen toegang tot heb (shared-hosting).
Kan dit niet met een .htaccess?
Ik heb het onderstaande op inet gevonden, maar ik snap het niet, of het werkt niet.
Multiple redirects in the same .htaccess file can be applied in sequence, which is what we’re doing here. This rule is added before the one we did above, like so:
Thus, if the user types in the URL products/12, our first rule kicks in, rewriting the URL to include the trailing slash, and doing a new request for products/12/ so the user can see that we likes our trailing slashes around here. Then the second rule has something to match, and transparently redirects this URL to productinfo.php?prodID=12. Slick.
Als ik het goed begrijp zou met de bovenstaande omschrijving het onderstaande krijgen. En dat functioneerd niet goed.