Hello!
I have a domain named here as domain.com and all files are in my home directory ~<userName>/sites/domain.com/www/.
I have also subdomain (made by .htaccess under www-directory) which works fine but if I have an empty directory without index-file then the directory listing page's title is wrong and also the "Parent Directory" link points to wrong location.
I have under www-directory:
subdomains/sd
subdomains/sd/dir1
dir1 doesn't contain anything.
If I write to browser http://sd.domain.com/dir1 it shows the directory listing with title: Index of /subdomains/sd/dir and the Parent Directory links to http://sd.domain.com/subdomains/sd. Browser's location bar is correctly http://sd.domain.com/dir1.
What should I do to get the title to be "Index of /dir1" and the parent link to "http://sd.domain.com/"? I hope you get what I mean!
.htaccess-file under www:
RewriteEngine on
# wrong subdomains -> domain.com
RewriteCond %{HTTP_HOST} !^domain\.com [NC]
RewriteCond %{HTTP_HOST} !^sd\.domain\.com [NC]
RewriteRule ^(.*) http://domain.com [R]
# sd.domain.com
RewriteCond %{HTTP_HOST} ^sd\.comain\.com [NC]
RewriteCond %{REQUEST_URI} !^/subdomains/sd
RewriteRule ^(.*)$ /subdomains/sd/$1
.htaccess-file under www/subdomains/sd:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ http://%{HTTP_HOST}/$1/ [R]
Thanks!