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 - take me directly to my blog?

Discussion in 'HTML & Website Design' started by satishtalim, Jul 14, 2007.

  1. #1
    I have a new Wordpress blog located at say http://mysite.com/blog. I am using Dreamhost. However, I don't have anything at http://mysite.com/

    How do I do the following?

    Whenever a user types http://mysite.com/ in his/her browser the user should be automatically taken to my blog.

    All help appreciated.
     
    satishtalim, Jul 14, 2007 IP
  2. stOx

    stOx Notable Member

    Messages:
    6,426
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    230
    #2
    Put this in an index.php file
    <?php
    header(”Location: http://www.domain.com/blog/”);
    exit();
    ?>
    Code (markup):
    It will generate a 302 redirect, So it shouldn't cause any problems if you later move things around.
     
    stOx, Jul 14, 2007 IP
    satishtalim likes this.
  3. satishtalim

    satishtalim Peon

    Messages:
    440
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks worked flawlessly.
     
    satishtalim, Jul 14, 2007 IP
  4. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #4
    I agree I use word press as well good job":D
     
    Aaron111, Jul 15, 2007 IP