1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subdomain creation using .htaccess & mod_rewrite

Discussion in 'Link Building' started by berzerker, Dec 23, 2010.

  1. berzerker

    berzerker Registered Member

    Joined:
    Jan 27, 2009
    Messages:
    76
    Likes Received:
    9
    This is a very simple project for someone who knows .htaccess, mod_rewrite, and apache extensively.

    I have a PHP file when queried is of the sort:

    http://www.usawebonline.com/search.php?site=cnn.com

    I need it re-written to be

    http://cnn.com/usawebonline.com

    IF NOT possible to use their domain as the subdomain, acceptable alternatives are:

    http://cnn-com/usawebonline.com (subbing "." for "-")
    http://cnncom/usawebonline.com (removing ".")


    I've tried many possibilities to achieve this but these is a detail wrong in every attempt, otherwise I would post what I have tried.

    Please help!
     
  2. The Captain

    The Captain Regular Member

    Joined:
    Sep 12, 2009
    Messages:
    343
    Likes Received:
    188
    why don't you just create it in cpanel?
     
  3. extremephp

    extremephp BANNED BANNED

    Joined:
    Oct 19, 2010
    Messages:
    1,293
    Likes Received:
    1,272
    Do you own any of the above mentioned CNN.com or USAWEBONLINE.com ??

    Or, If they are examples, Do you have the access to both of the real domains?

    In that case, it can be done!

    ~ExP~