.htaccess Question!

Discussion in 'Site & Server Administration' started by hitboy, Mar 3, 2008.

  1. #1
    Hello I have a couple of questions on how i could do what I need.

    Basically I am moving my blog which is currently in the main directory
    Current location: http://www.hpkmedia.com/
    New Location: http://blog.hpkmedia.com/

    I want to move it to the new location.

    The problem is this I want to create a 301 redirect to redirect EVERYTHING meaning all links from http://www.hpkmedia.com/examplelink.blah.blah to http://blog.hpkmedia.com/examplelink.blah.blah.

    But here is where comes my problem... I want everything to redirect except the main page http://www.hpkmedia.com/ & or http://www.hpkmedia.com/index.php

    Does anyone know how I do this?
     
    hitboy, Mar 3, 2008 IP
  2. gate2vn

    gate2vn Peon

    Messages:
    809
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    0
    #2
    How about this code in .htaccess
     
    gate2vn, Mar 3, 2008 IP
  3. hitboy

    hitboy Well-Known Member

    Messages:
    2,939
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    170
    #3
    Thats what I was thinking too but I think that will redirect the www.hpkmedia.com to blog.hpkmedia.com as well how do I exclude the main page
     
    hitboy, Mar 3, 2008 IP