Forum Moderators: phranque
The site's .htaccess file:
I have three questions.
1. Is it best to use a different .htaccess file for each subdomain?
2. I tried placing just one .htaccess in the www. root. The html pages did get processed as php, even in the subdomains, but other functions didn't seem to work, particularly the hotlinking. (Images in the subdomains were blocked when they should have been visible.)
Is that because when a page is requested from the subdomain, the server doesn't go to the www root first? Or is this possible and I just did something wrong?
3. Am I right in assuming that I don't can't force a canonical URL in the subdomain? Trying that put the server in a loop. Actually, it looks like it's not needed because you can't type a non-canonical URL that goes to the subdomain, can you?
Thanks!
ln -s target linkname- creates a symbolic link, like a shortcut to the target directory or filename.ln target linkname- creates the default hard link. Deleting this will delete the targetted file or directory.
I supposed I'd have to have command line access to the system to use a soft link.
Would I add the symbolic link in the directory in which I want to make that file available?
To force the canonical URLs would I just add something like this below?
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^(www\.¦en\.¦ast\.¦fr\.)mydomain\.com
RewriteRule ^(.*)$ [mydomain.com...] [R=301,L]
That assumes a root (www) and three different subdomains (en, ast, and fr).
Jim