Hie all,
I'm trying to make a dynamic sub domains for my users like username.host.com instead of www.host.com/user.php?user=username
For that i created a A RECORD in my hosting like
*.mosto.in 208.91.199.44 Active
In my .htaccess file i've added the following
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.mosto\.in$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.mosto\.in(.*) /home/$1$2
The above code i found on Apache official website http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#content
But when i trying to open dev.mosto.in is not opening.
Any clues or ideas ? Where i'm doing wrong ?
Enable mod_rewrite and .htaccess through
httpd.conf
and then put this code in your.htaccess
underDOCUMENT_ROOT
directory: