- Code: Select all
RewriteCond %{HTTP_HOST} !^(www\.)?domain.nl$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.domain.nl$ [NC]
RewriteCond %2---%{REQUEST_URI} !^(.+)---/\1(/.*)?$
RewriteRule .* /%2%{REQUEST_URI} [QSA,L]
This all works fine, but...... now i have a cookie problem
when logging in at sub.domain.nl, the loginscript a domain.nl/sub/index.php will show up.
In this script, there will be checked for existing cookies 'name'and 'md5pass' . These cookies do exist, for the domain sub.domain.nl.
But although the browsers address bar says were at sub.domain.nl, actually the script is at domain.nl/sub/index.php.
For safety reasons, a browser can only read cookies from its own (sub)domain i guess.
Any Ideas?