Redirect via .htaccess or PHP?

  • Author
    Posts
  • #19528

    alunsalt
    Member

    Is anyone here familiar with .htaccess?

    I ask as I’m moving my site from a WordPress blog on my own server to WordPress.com and I’d like to put in redirects so that:
    http://archaeoastronomy.co.uk/2006/
    is redirected to –
    http://archaeoastronomy.wordpress.com/2006/
    My cunning plan is that it doesn’t then look like all inward links are broken.

    Except I’ve tried cut ‘n’ pasting a few things in from the web and I’ve had not success. Either .htaccess or a php script to drop into the 2005 and 2006 folders on my server would be helpful if anyone knows of an obvious solution.

    Thanks,

    Alun

    #19670

    cornell
    Member

    Alun

    I don’t know if this will help, but googled htaccess redirect and it came back with this:

    http://www.javascriptkit.com/howto/htaccess7.shtml

    As it’s your own server then JS and htaccess mods won’t be a problem. :)

    Collin

    #19672

    alunsalt
    Member

    Thanks I found that one, but that’s something I’m trying to avoid. If I understand it correctly it means specifying individual entries for 700+ pages. I’m looking for something that can simply swap one server in the URL for another.

    I’ll give this a go (http://daringfireball.net/2006/05/htaccess_redirection) as it seems a bit more clearly explained than the other pages I’ve found.

    #19673

    alunsalt
    Member

    No that didn’t work either. Looks like I’ll have to sit down with my PHP books.

    #19674

    alunsalt
    Member

    Resolved, the answer was obvious in the end, hence my lack of hair. The lines in .htaccess are:
    Redirect /2006 http:// archaeoastronomy.wordpress.com/2006
    Redirect /2005 http:// archaeoastronomy.wordpress.com/2005
    without the spaces between // and a

    #19675

    cornell
    Member

    Nice one! :)

The topic ‘Redirect via .htaccess or PHP?’ is closed to new replies.