Forum Moderators: phranque
site.com A: 123.123.123.123
www. A: 123.123.123.123
*. A: 123.123.123.123
site.com is IP based site. Both www.site.com and anything.site.com point to same IP (123.123.123.123). There are /index.html and /test.php under root folder of site.com.
I want
1. site.com 301 redirect to www.site.com, and
2. www.site.com shows /index.html and
3. others.site.com shows /test.php?subdomain=others
4. others.site.com/file1/file2.html shows /file.php?subdomain=others¶m1=file1¶m2=file2
How to create the /.htaccess file?
TIA
[edited by: iProgram at 2:30 pm (utc) on Oct. 1, 2006]
To get started, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
There are also many past threads on this subject, and a search on WebmasterWorld for "subdomain sudirectory rewritecond http_host rewriterule" should reduce the number of search results to help turn them up.
Jim