Fork me on GitHub

How to redirect from the URL format of PN 0.64 to the new one?  Bottom

Go to page 1 - 2 [+1]:

  • I use PostNuke since 2002 and I've written more than 2500 articles. The URL format of them is "www.mywebpage.com/articlexxxx.html", where xxxx is the number of the post.

    Now, I'm going to test PostNuke 0.8 RC3 but I have a doubt: what I have to do to redirect my articles from the format I use now to the one this new version uses ("www.mywebpage.com/title-of-the-new.html")? Which is the rule I have to add into the .htaccess file?

    Thanks.
  • Read http://community.pos…le=article&sid=2891

    Then specifically "URL rewriting customized". Check if the nodules you used for your articles has "encodeurl" and "decodeurl" functions available and check if they can translate from title to ID.
  • if you really want to change from file-based to directory-based urls i'd suggest to use the 'numeric' option for the permalinks [index.php?module=News&type=admin&func=modifyconfig] - this way you can simply redirect via

    Code

    # handle the old style urls
    RewriteRule ^(.*)Article(.*).htm /News// [R=301,L]



    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • Ok, thanks icon_cool
  • I think this is a stop-gap measure and not really a solution as it does not provide a method to get to better SEO-ed URLS. Agreed it is easier to use the blanket rule suggested above and stick to numeric permalinks, it does not assist in helping get to the "other" level (oracle) so to speak that would truly bring PN up to speed.

    At present I have many /Articlexxxx.html pages out there, that i want to do a permanent redirect to /Name-of-Article-to-get-more-hits/

    Any other ideas? There must be a way...if there is truly a will.

    Thanks

    supa

    --
    ttgapers.com - the latest from the caribbean
    Caribbean News
    Online Shopping from USA, Canada, UK, France, Germany
    On Facebook
  • Hack the news module to handle your URLs - there's no way of doing a redirection like that through htaccess, so you'd have to redirect to the news module with the numeric link, and then redirect again to the SEO directory link.

    Or, just switch over and take the very temporary hit in search engine ranking in view of the future benefits.

    --
    itbegins.co.uk - Zikula Consulting

    birtwistle.me.uk - Personal Blog


    Please read the Support Guide
  • personally i'd recommend to use a status-404 redirection to the index (or a specific landing page) to kick those entries out of the SERPs - the re-inclusion of the new links shouldn't be that big task with a little help of sitemaps etc. - but anyway: don't be too optimistic about the effects of 'speaking' urls in terms of SEO icon_wink

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • Hello Abadia, how do you solve this?

    It take me hours to configure 390 redirects in the old postnuke format to new dir based short uri of zikula, in rules like that

    redirect permanent /Article46.html http://www.site.com/News/TEMPO-PRESENTE/

    But this doesnt working, when you go to www.site.com/Article46.html it create a URL like

    http://www.site.com/News/TEMPO-PRESENTE/?Article46.html



    Simon

    Hack the news module to handle your URLs - there's no way of doing a redirection like that through htaccess, so you'd have to redirect to the news module with the numeric link, and then redirect again to the SEO directory link.

    Or, just switch over and take the very temporary hit in search engine ranking in view of the future benefits.


    How we can do that?
  • Hi, I'm no expert, but I came across this issue when I started to use RC2! To solve it, I created a custom module, "URLconverter". The module works like this:
    1. Use .htaccess to send all 'old style' URLs to the URLconverter module.
    2. Parse the requested URL to identify the module which handles that URL.
    3. Call the appropriate function for that module (using a plugin type system).
    4. The function parses the URL to get the object ID (e.g. article ID).
    5. Request the object from DB (e.g. article) to check it exists, if not, issue a 404 or 410.
    6. If the object exists then use pnModUrl to create the 'new style' URL.
    7. Issue a 302 Moved Permanently to redirect the user.

    Search engines react really quickly to this approach (according to my *very* limited 1 site test!). Although there is still the occasional request for old style URLs even all this time after RC2 was released.

    My code was written for personal use, and is probably not up to scratch so I'm a bit reluctant to pass it on. It's really easy though. Furthermore the only standard plugin I wrote was for the news module, all my other modules are custom so someone would have to make plugins for all the other modules.

    Hope that helps...
  • adamjjackson

    My code was written for personal use, and is probably not up to scratch so I'm a bit reluctant to pass it on. It's really easy though. Furthermore the only standard plugin I wrote was for the news module, all my other modules are custom so someone would have to make plugins for all the other modules.


    Pretty neat. You can pass it on to me icon_biggrin , if you don't mind. daveATzikulaDotorg


    --
    David Pahl
    Zikula Support Team
  • Adam, this module would be very useful for every user of PN 0.764. Thus, the transition to Zikula get better in search engine optimization.
  • Hello,
    I will e-mail it to AmmoDump this weekend and he can check it doesn't have any major security flaws and proceed from there. I would e-mail it sooner but I'm not near the correct computer at present...

    Cheers
  • Quote

    Hi, I'm no expert, but I came across this issue when I started to use RC2! To solve it, I created a custom module, "URLconverter". The module works like this:
    1. Use .htaccess to send all 'old style' URLs to the URLconverter module.
    2. Parse the requested URL to identify the module which handles that URL.
    3. Call the appropriate function for that module (using a plugin type system).
    4. The function parses the URL to get the object ID (e.g. article ID).
    5. Request the object from DB (e.g. article) to check it exists, if not, issue a 404 or 410.
    6. If the object exists then use pnModUrl to create the 'new style' URL.
    7. Issue a 302 Moved Permanently to redirect the user.

    Search engines react really quickly to this approach (according to my *very* limited 1 site test!). Although there is still the occasional request for old style URLs even all this time after RC2 was released.

    My code was written for personal use, and is probably not up to scratch so I'm a bit reluctant to pass it on. It's really easy though. Furthermore the only standard plugin I wrote was for the news module, all my other modules are custom so someone would have to make plugins for all the other modules.

    Hope that helps...


    Can you send it to me, please?

    This is my mail: abadiadigital AT gmail.com

    Thanks.
  • Yep, no problem, see private message...
  • Module received and tested. It works fantastic!

    Thanks Adam!

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.