WordPress.org

Ready to get started?Download WordPress

Forums

moved to wordpress from joomla (18 posts)

  1. gtcave
    Member
    Posted 7 years ago #

    Hey guys. I have been using joomla for years. Now i am on the verge of switching to wordpress, which i have realised is much better for blogs. I have the wordpress blog set up etc, but the thing is i dont want to lose page rankings etc. I have over 1,000 unique articles. My site is pretty busy as well.

    How would i do a 301 redirect?

    The Joomla url for all the articles are as follows http://www.example.com/pspnews/articletitle/

    Ok and for the permalink in the wordpress im going to use the one http://www.example.com/dd/mm/yy/articletitle/

    I have no idea about 301 redirects in .htaccess but i really want to get my move going to wordpress as soon as possible. Somehow i would have to get all urls redirected with the date of the article in the URL.

    If anyone can help me, i'd really appreciate it.

    Regards

  2. gtcave
    Member
    Posted 7 years ago #

    aww man, can no-body help me? I really want to finish the move to wordpress

  3. absalom
    Member
    Posted 7 years ago #

  4. gtcave
    Member
    Posted 7 years ago #

    Nah thats not what im after. aaarrgghhhhh

    Ok i may have a solution but i need a few people to confirm this for me if it will work.

    Ok joomla URL's are:
    http://www.example.com/pspnews/articletitle/

    And for WordPress im using permalink:
    http://www.example.com/dd/mm/yy/articletitle/

    I cant do php redirects because im not changing the main domain name.

    Im thinking it must be possible to create code in .htaccess to show articles with 2 different permalinks.

    For example to show a permalink like:
    http://www.example.com/pspnews/articletitle/

    and ALSO like:
    http://www.example.com/dd/mm/yy/articletitle/

    So articles appear when visited on both permalinks.
    That way i wont lose page rank on articles and people viewing articles on the old URL will still see the same article.

    Anyone know if this is possible?

  5. Doodlebee
    Member
    Posted 7 years ago #

    Are you moving your site *totally* from Joomla to WP? Or are you keeping the Joomla site as well?

  6. gtcave
    Member
    Posted 7 years ago #

    Well im moving completely to wordpress now and going to keep the same domain. I've ported all the articles etc over to the WP database, but need to redirect all the old urls to what i want as the new url structure in WP.

    All i think that is needing done is redirecting people who go to

    http://www.mysites.com/pspnews/%postname%/

    to

    http://www.mysite.com/year/mm/dd/%postname%/

    I have no idea how to do this in .htaccess

    Im a noob in .htaccess but im not stupid if you get me. :)
    Can ya help me?

  7. Doodlebee
    Member
    Posted 7 years ago #

    Can ya help me? not sure ;)

    However, you *can* make your own settings for WordPress and how it creates URLs for permalinks. You can set your permalinks to be writtein *only* as %postname%, and then any URL's that have already been indexed would still have the same link.

    The only problem with that, though, is that you must be sure that, for the entire life of your blog, that you *never* have two posts with the same title.

    That's one possible solution, if you think you can handle that restriction :)

    But an .htaccess redirect would probably be best in the long run. I'm not an .htaccess guru either, but I do know if you google for 301 redirected .htaccess, you'll find a *plethora* of tutorials on how to do it. All you'd need to do is add that stuff to your current .htaccess file.

  8. gtcave
    Member
    Posted 7 years ago #

    lol i've had a look and its like a foreign language to me.

    Anyone help me out?

    I thought it was really hard at first, but in simplest terms i want anyone going to:

    http://www.mysites.com/pspnews/%postname%/

    to

    http://www.mysite.com/year/mm/dd/%postname%/

    Currently people going to
    http://www.mysites.com/pspnews/%postname%/

    are redirected to a 404 page. I want them to be redirected to the new url. But i have no idea.

    Anyone whos a genius at .htaccess files help me out!?

  9. Reggie98
    Member
    Posted 7 years ago #

    You could put a redirect in the .htaccess for files that contain /pspnews/ and redirect it to a php file.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /pspnews/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/redirect.php [L]
    </IfModule>

    (I'm guessing the above from the standard .htaccess for WordPress, but you will need to check). This site had some useful .htaccess tips.

    or try:
    RewriteEngine on
    RewriteRule ^pspnews/(.+) /wordpress/redirect.php?original_url=$1 [nc]

    The redirect.php file would then read the database and find the year/month/date values for the article. It could then either do a header redirect

    header ("Location: $year/$month/$day/$original_url" ) ;

    or just set $_SERVER["QUERY_STRING"] = $original_url and then include the /wordpress/index.php

  10. Doodlebee
    Member
    Posted 7 years ago #

    but that's what I'm saying - WordPress has an option to set your permalinks so you can have them in the same way you had them in Joomla - no redirect needed. So, if your Joomla posts were http://www.mysites.com/pspnews/%postname%/, then you can set up WordPress so your permalink is exactly the same. So when people go to that post, then they'll see it - not a 404 page.

    Again, you just have to be careful not to name any of your posts the same.

    and...tons of .htaccess stuff here if you'd rather go that route.

  11. gtcave
    Member
    Posted 7 years ago #

    doodlebee i thought i made clear i want to use the date in the URL's and not the old joomla permalink. I know how to do it the way you just said but dont want it like that 'll try the way Reggie just said n see if it works.

    Thanks

  12. gtcave
    Member
    Posted 7 years ago #

    Hey Reggie, im kind of lost at the redirect.php bit.

    How would i work out the /year/month/date of the article in the PHP file? My mind is blank. I kinda know what your trying to do and its what im looking for.

  13. gtcave
    Member
    Posted 7 years ago #

    anyone? :) :) :) :)

  14. Doodlebee
    Member
    Posted 7 years ago #

    i thought i made clear i want to use the date in the URL's and not the old joomla permalink.

    Apologies, no - I didn't get that part. What it sounded like to me was that you were worried upon moving to WordPress that your old indexed posts were going to go 404 on people when they googled, and you'd lose your current ranking. It was my understanding that you were trying to figure out how to keep your ranking - and the best way would be to keep your old URL - which you could. The mentions of Joomla's URL vs. WP said to *me* that you were trying to work out a possible way to keep your old URL's, since you didn't want to lose your rank (as per the inital question).

    So, no, I wasn't aware that the date was something you wanted to do.

  15. pizdin_dim
    Member
    Posted 7 years ago #

    "The mentions of Joomla's URL vs. WP said to *me* that you were trying to work out a possible way to keep your old URL's, since you didn't want to lose your rank (as per the inital question)."

    I think your page rangings are going to disappear anyway because you're changing the URI. Do you think it works otherwise?

  16. Doodlebee
    Member
    Posted 7 years ago #

    I think your page rangings are going to disappear anyway because you're changing the URI.

    But that's the thing - if he changed the permalinks so that they're by postname, instead of by date/postname - which he can do, provided he doesn't have any posts with the same name - then he won't be changing the URI. *That's* what I've been saying.

  17. pizdin_dim
    Member
    Posted 7 years ago #

    "But that's the thing - if he changed the permalinks so that they're by postname..."

    We agree then, the permalink should remain as:

    http://www.mysites.com/pspnews/%postname%/

  18. Doodlebee
    Member
    Posted 7 years ago #

    Right, dim - we agree :) AT least that solution for the initial question about losing rank. If he *does* change the URL, then yes, he'll lose rank. But if he doesn't care about rank, and wants the new format, then yes, he'll need .htaccess to do a 301 redirect.

Topic Closed

This topic has been closed to new replies.

About this Topic