mod rewrite - problem with subdomains in apache22+freebsd8 -


i have domain somedomain.net linked ip 123.45.67.89

i need have such subdomains:

  • sub.somedomain.net - points ip 123.45.67.89
  • *.sub.somedomain.net - catch *. in sub.somedomain.net

in apache.conf have such record:

<virtualhost *:80>   documentroot "/www/somedomain.net"   servername somedomain.net   serveralias www.somedomain.net   serveralias sub.somedomain.net   serveralias *.sub.somedomain.net    rewriteengine on   rewritecond %{http_host} ^(.*)\.somedomain\.net$   rewriterule ^(.*)$ http://somedomain.net [r,l] </virtualhost> 

but have 404 error while opening http://sub.somedomain.net

in domain admin-panel have such records:

somedomain.net in 123.45.67.89 somedomain.net in ns1 ns1.domain-seller.com. somedomain.net in ns2 ns2.domain-seller.com. sub in 123.45.67.89 *.sub in 123.45.67.89 

where mistake? thanks!

ps: i'm using dedicated server, can changes in configurations.

somedomain.net in 123.45.67.89 somedomain.net in ns1 ns1.domain-seller.com. somedomain.net in ns2 ns2.domain-seller.com. sub in 123.45.67.89 *.sub in 123.45.67.89 

that looks wrong. if that's bind file, need write sub.somedomain.net , not sub only.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -