View previous topic :: View next topic |
Author |
Message |
emiljansson
Joined: 03 Sep 2004 Posts: 2
|
Posted: Mon Sep 20, 2004 11:34 pm Post subject: subdomain |
|
|
Any one experiences with .htaccess file in a subdomain, how should i write the file then? it is in there own kind of root...
Best-
E |
|
Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Sep 21, 2004 10:47 pm Post subject: |
|
|
How do you mean?
If you access Peffisaur at http://subdomain.domain.com it's still just the same .htaccess I think. I think Apache translates it so that it looks like it's the root of that domain.
I haven't tried this myself but if it doesn't then I think it would be just like having it in a subdirectory. If an access to http://subdomain.domain.com in reality means something like http://domain.com/subdomain then you would need to put /subdomain as "root" in the .htaccess and the rewrite rule would be /s/blablabla /subdomain/home.php?id=
and so on...
But my guess is that you don't have to do anything special at all. Where I host peffis.com it acts as a "subdomain" to hellkvist.org. An access to peffis.com is equivalent to hellkvist.org/peffis....but I have no change to .htaccess. Apache changes it all to look like the files are in the "root". |
|
Back to top |
|
 |
dsas
Joined: 11 Jun 2005 Posts: 1 Location: UK
|
Posted: Sat Jun 11, 2005 5:27 pm Post subject: |
|
|
just to confirm it is the same .htaccess, however if you try to access that subdomain as domain.com/peffis rather than peffis.domain.com, you'll encounter errors.
I don't know much about .htaccess to suggest a way so both will work, I just use one and stick to it... |
|
Back to top |
|
 |
|