1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to set url like subdomain using .htaccess and php

Discussion in 'PHP' started by creativewebmaster, Jan 29, 2014.

  1. #1
    how to set url like subdomain using .htaccess and php
    SEMrush
     
    creativewebmaster, Jan 29, 2014 IP
    SEMrush
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    if you are asking like

    page1.domainname.com
    3page.domainname.com
    2page.domainname.com

    You need to set this on your dns. Start from that.
     
    bartolay13, Feb 4, 2014 IP
  3. spiderindia

    spiderindia Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    <VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com *.example.com
    DocumentRoot /www/domain
    </VirtualHost>

    Adding the wildcard subdomain *.example.com, your PHP application will receive all requests for any domain below example.com, ie garbage.example.com, busted.example.com, llama.example.com, etc.
     
    spiderindia, Feb 5, 2014 IP