Hello,

I'm trying to create certain functionality using .htaccess files only.

Suppose we have a domain and a subdomain with document roots as follows:

domain.com -> /home/user/public_html
sub.domain.com -> /home/user/public_html/sub

The contents of /home/user/public_html are as follows ([]'s are directories):


[something]

[something_else]

[sub]

main.file

sub.file

What I'd like to do is this:
Make all domain.com requests that do not request an actual filename go to 
main.file file.
Make all sub.domain.com requests that do not request an actual filename go to 
main.file file.
I can do what I want using VirtualHosts easily (one for domain.com and another 
for sub.domain.com) but I'm not sure about .htaccess here. How would you do 
this?



      

Reply via email to