Forum Moderators: phranque

Message Too Old, No Replies

[mod rewrite] - rewrite by subdomain

         

manuelsechi

2:46 pm on Mar 2, 2008 (gmt 0)

10+ Year Member



hello friends

I'd like to rewrite an url based on subdomain name, for example I have three subdomain as:

[sub1.mysite.com...]
[sub2.mysite.com...]
[sub3.mysite.com...]

theese tree subdomains got the same documentRoot, and inside the document root there are three files, for example:

sub1.txt
sub2.txt
sub3.txt

what I'd like to do is when I try to access

[sub1.mysite.com...]
apache serve to me the file
[sub1.mysite.com...]

and so on for all others domains:

[sub2.mysite.com...] --> [sub2.mysite.com...]
[sub3.mysite.com...] --> [sub3.mysite.com...]

thanks all for any help
regards
Manuel

jdMorgan

9:49 pm on Mar 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this search [google.com] to see dozens of previous threads on this subject -- Most with example code.

Jim