• 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 https://www.example.com/pspnews/articletitle/

    Ok and for the permalink in the wordpress im going to use the one https://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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter gtcave

    (@gtcave)

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

    Thread Starter gtcave

    (@gtcave)

    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:
    https://www.example.com/pspnews/articletitle/

    And for WordPress im using permalink:
    https://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:
    https://www.example.com/pspnews/articletitle/

    and ALSO like:
    https://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?

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

    Thread Starter gtcave

    (@gtcave)

    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

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

    to

    https://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?

    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.

    Thread Starter gtcave

    (@gtcave)

    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:

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

    to

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

    Currently people going to
    https://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!?

    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

    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 https://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.

    Thread Starter gtcave

    (@gtcave)

    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

    Thread Starter gtcave

    (@gtcave)

    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.

    Thread Starter gtcave

    (@gtcave)

    anyone? ?? ?? ?? ??

    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.

    “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?

    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.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘moved to wordpress from joomla’ is closed to new replies.