Forum Moderators: phranque
Currently I have:
RewriteCond %{HTTP_HOST}!^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST}!^$
RewriteRule ^/(.*) [domain.com...] [L,R]
I need to be able to have it do something like this:
subdomain.domain.com redirects to [domain.com...]
Is there an easy way to do this without having to worry about creating virtual hosts?
Welcome to WebmasterWorld!
We have had several recent threads on rewriting subdomain requests to subdirectories [google.com]. You might want to review them, have a go at coding up a solution, and let us know the test results if ti doesn't quite work properly.
References to mod_rewrite documentation and information on how to use this forum are available in our Apache Forum Charter [webmasterworld.com].
Defining virtual hosts is the preferred method, but the threads I cited above provide an alternative if you don't have access to httpd.conf.
Jim