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.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
How to redirect from the URL format of PN 0.64 to the new one?
-
- Rank: Freshman
- Registered: Sep 10, 2004
- Last visit: Apr 23, 2010
- Posts: 96
-
- Rank: Developer
- Registered: Feb 17, 2005
- Last visit: May 21, 2010
- Posts: 684
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.
-
- Rank: Software Foundation
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 3814
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]::.. -
- Rank: Freshman
- Registered: Sep 10, 2004
- Last visit: Apr 23, 2010
- Posts: 96
-
- Rank: Softmore
- Registered: Dec 23, 2003
- Last visit: May 05, 2010
- Posts: 351
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
--
Caribbean News
Online Shopping from USA, Canada, UK, France, Germany
On Facebook -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
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 -
- Rank: Software Foundation
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 3814
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
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::.. -
- Rank: Softmore
- Registered: May 12, 2005
- Last visit: Oct 21, 2009
- Posts: 109
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? -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Jul 22, 2008
- Posts: 53
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... -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
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
, if you don't mind. daveATzikulaDotorg
--
David Pahl
Zikula Support Team -
- Rank: Registered User
- Registered: Jan 26, 2005
- Last visit: Oct 21, 2009
- Posts: 22
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. -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Jul 22, 2008
- Posts: 53
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 -
- Rank: Freshman
- Registered: Sep 10, 2004
- Last visit: Apr 23, 2010
- Posts: 96
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. -
- Rank: Freshman
- Registered: Sep 10, 2004
- Last visit: Apr 23, 2010
- Posts: 96
- Moderated by:
- Support
