WordPress.org

Ready to get started?Download WordPress

Forums

htaccess redirect (3 posts)

  1. bloggenbent
    Member
    Posted 4 years ago #

    Hey,

    I'm running into a bit of trouble, and I was hoping I could ask your advice. I'm running an aging blog on a xoops platform using the old XPress module. XPress is wordpress, so I dare ask this question here. And I am going to use my top domain for a new wordpress blog.

    My intention is to deprecate the Xoops site and go with a pure wordpress blog. The XPress module is a great module, but it is dead and no one seem to be maintaining it.

    Now, I have mirrored the old site as an archive, and i would like to use .htaccess to permanently move all the incoming visitors and links to the subdomain "old".

    The nearly two thousand posts I have on the old blog can all be identified with the following pattern:

    [mydomain.com]/modules/wordpress/[some post link]

    When someone (or something) clicks on a link on google or the blog portals, they should be permanently redicted to my archive. Anyone that clicks a link without that pattern should be allowed to see the new site.

    I've read dozens and dozens of htaccess guides, and I think I can reasonably redirect specific files, and specific pages, but how do you redirect according to the above pattern? I can't seem to find the answer. It will probably be very simple, but so far all my attempts to edit the htaccess results in a 500-error.

    This is my last attempt - which gave the 500-error. I've got Option +SymLinks on.

    RewriteCond %{HTTP_HOST} ^http://[mydomain.com/modules/wordpress/ [OR]
    RewriteCond %{HTTP_HOST} ^http://[www.mydomain.com]/modules/wordpress/
    RewriteRule ^(.*)$ http://old.mydomain.com/modules/wordpress/$ [R=301,NC,L]

    Hopefully you all know the answer, and hopefully you could share it with me before I get completely bald from tearing my hair out.

    Cheers and thanks in advance.

  2. stvwlf
    Member
    Posted 4 years ago #

    Great forum that specializes in mod rewrite issues and answers questions like yours http://forum.modrewrite.com/index.php

  3. bloggenbent
    Member
    Posted 4 years ago #

    Thanks. I will try there as well. If anyone here can answer, it would be very much appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic