.htaccess mod_rewrite help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux