Please excuse me and my near-to-zero apache skills. I'm an owner of a website and I would love to redirect my fourth level domains (for example fyz.edu.ondrejaugusta.cz, che.edu.ondrejaugusta.cz etc.) to a directory /subdomains/fyz, /subdomains/che respectively.
Also I would appreciate if the URL didn't change to ondrejaugusta.cz/subdomains/fyz (or /che) and stayed like fyz.edu.ondrejaugusta.cz.
I'm struggling to get it working for more than a week now - I've read a lot of articles, none of which (sadly) helped me. Please tell me what I'm supposed to do / change, I am clueless.
RewriteCond %{HTTP_HOST} ^fyz\.edu\.ondrejaugusta\.cz$
RewriteRule ^ http://ondrejaugusta.cz/subdomains/fyz%{REQUEST_URI} [L,P]
RewriteCond %{HTTP_HOST} ^che\.edu\.ondrejaugusta\.cz$
RewriteRule ^ http://ondrejaugusta.cz/subdomains/che%{REQUEST_URI} [L,P]
This is the code I've got so far. It's working, but redirecting to /subdomains/fyz (/subdomains/che).
Also don't worry, I'm not teaching informatics or English.