• OK – amazing so far! Super easy install and I love the UI.
    I have a massive history imported from MT which all shows up beautifully in WP. You can see the MT site here – https://www.atmasphere.net/mt and WP site here – https://www.atmasphere.net/wp
    My question is this… how can I retain all my previous posts and urls? I’d love to switch over to WP but don’t want to lose all my Google linkage. I’ll have to mimic my page design as well, but I’ll get to that later.
    Thanks!

Viewing 15 replies - 1 through 15 (of 26 total)
  • @atmasphere: I did not see permalinks to your entries. The only permalinks I found were the category permalinks which you could easily redirect using a modified .htaccess file. G****e is very good at understanding and following redirects and relinkage.
    Very interesting blog, BTW

    Thread Starter atmasphere

    (@atmasphere)

    I’ve got permalinks on the MT site … example – https://www.atmasphere.net/mt/archives/006882.html
    If you could help me better understand how to redirect through htaccess, would greatly appreciate it.
    I guess the best way to do this is to leave the MT site and redirect to WP right?
    Glad you like the site.

    ?? That should be really interesting because of the fragmented nomenclature of your MT. I would suggest running both in parallel till the search engines have picked up enough of your WordPress blog. Good luck!
    Here are some good .htaccess resources:
    https://www.javascriptkit.com/howto/htaccess.shtml
    https://wsabstract.com/howto/htaccess.shtml

    The 1.2 alpha code includes a field called ‘post slug’ that could be used to match your MT post IDs. Of course, 1.2 isn’t quite ready yet and you’d need to write a script to populate that field…
    You could also maintain an internal reference table and add code at the top of index.php to match (translate) based on that table.

    Thread Starter atmasphere

    (@atmasphere)

    Looking at https://wsabstract.com/howto/htaccess7.shtml
    I found this :

    htaccess uses redirect to look for any request for a specific page (or a non-specific location, though this can cause infinite loops) and if it finds that request, it forwards it to a new page you have specified:
    Redirect /olddirectory/oldfile.html https://yoursite.com/newdirectory/newfile.html
    Note that there are 3 parts to that, which should all be on one line : the Redirect command, the location of the file/directory you want redirected relative to the root of your site (/olddirectory/oldfile.html = yoursite.com/olddirectory/oldfile.html) and the full URL of the location you want that request sent to. Each of the 3 is separated by a single space, but all on one line. You can also redirect an entire directory by simple using Redirect /olddirectory https://yoursite.com/newdirectory/
    Using this method, you can redirect any number of pages no matter what you do to your directory structure. It is the fastest method that is a global affect.

    I’ve got close to 2000 posts … do I have to do that for each one? It’s not clear how redirecting the directory works… as the numbers will be different on the two systems.

    Thread Starter atmasphere

    (@atmasphere)

    I am still working this through how exactly this will work in my situation.
    One post I have :
    https://www.atmasphere.net/mt/archives/006882.html
    will correspond to either:
    https://www.atmasphere.net/wp/archives/1850/
    or
    https://www.atmasphere.net/wp/archives/2004/03/27/on-microsofts-xna-play

    Can anyone tell me what the correct way to redirect this might be? As I previously mentioned I have close to 2000 posts so I need to figure out a way to dynamically figure out where to send the visitor of the old system.
    One thing I suppose I could do would be to move the new blog to /mt from /wp which would keep the site the same. Or I can bite it and lose some fantastic G**gle action and just keep everything in wp.

    I think you’re going to need to go the internal reference route. Here are the steps I’d take:
    Create a lookup table that holds the IDs of your MT posts and the matching URL in WP.
    Create a wp-redirect.php file that we put in the mt/ directory (perhaps in the mt/archives/ directory) and a mod_rewrite rule that take your permalink URL:
    https://www.atmasphere.net/mt/archives/006882.html
    and changes it to:
    https://www.atmasphere.net/mt/wp-redirect.php?p=006882
    Then the wp-redirect.php page looks up the ID of the post in the internal reference and redirects the user to the post in WP, sending a 301 (permanently moved) header at the same time (Google picks this up too).
    I’ll help you with this if you like – sounds like a useful bit of code for people who want to switch.
    As a side note, this well illustrates the reason you should name your web site directories based on function, not the software running behind the scenes. You could kept a /blog/ or /journal/ URL, but a /mt/ URL is somewhat meaningless now. ??

    I was thinking something very simlar to what Alex said, but one that redirected using something other than the MT internal IDs, which are (at best) unreliable.
    The ideal mt-redirect.php script:
    * Takes the parameters of year, month, day, time, title.
    * Drills down using those parameters to find a post that is the best match
    * Call get_permalink() for that post ID and send a 301 permanent redirect.

    Why would you only have the MT ID? Use MT to do One Final Publish, and have the individual entry templates redirect (or pass variables to a function) that sends the 301 header.

    I also remember seeing some instructions about using an MT template to write an .htaccess file that handled redirects. We could create an MT template that did something like that.

    You’d only have the MT post ID if you were using mod_rewrite from the incoming URL.

    I agree, your approach is better. I’ve been working on it.

    Awesome. ??
    This will be a great addition.

    Thread Starter atmasphere

    (@atmasphere)

    In my case it replaced the individual archive – should have mentioned that

    Here’s a trick so you don’t have to rename everything from .html to .php, put this in your .htaccess:
    AddType application/x-httpd-php .html
    Then all your .html pages will be parsed by PHP. Cool, eh?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘coming from Moveable Type’ is closed to new replies.