Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Create Subdomains on the fly using .htaccess file?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 521
    Comment on it

    If you are creating subdomains using htaccess for this, you have to set the virtual host

    Follow the below steps.

    Step 1: Create a wildcard DNS entry first.

    *.domain.com.   3600  A  127.0.0.1
    

    Step 2: Now Setup the Virtual Host, in your vhost file.see below code.

    <virtualhost>
        DocumentRoot "E:\wamp\www\myproject"
        ServerName myproject.domain.com
        <directory myproject="" wamp="" www="">
            AllowOverride All
            Order allow,deny
            Allow from all
        </directory>
    </virtualhost>
    

    Step 3: Now you have to write your all code in Root path i.e.C:\wamp\www\myproject

    Step 4: Now its Done, you can access now with myproject.domain.com.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: