Changing non-pretty URL links made in editor to pretty URL links?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
bosserik
New Member
New Member
Posts: 7
Joined: Tue Jan 31, 2006 11:32 am

Changing non-pretty URL links made in editor to pretty URL links?

Post by bosserik »

Hi all.

I have mod-rewrite turned on and it works on my menu links, but not on my page links.

After spending many hours finding a solution for my mod-rewrite problem, I finally understood, that the links made in the editor are saved in the database, and will not rewrite itself...

So, now I have a site with many internal page links like index.php?page=xx

Is there any way to convert these to pretty url links, without having to change them manually?

Hope there is a solution for my problem.

Regards,
Tim
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by calguy1000 »

if you're using {cms_selflink ...} to create your internal page links all you should need to do is clear you cache.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Pierre M.

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by Pierre M. »

Hello,

BTW, when pretty URLS are on, unpretty URLs like /index.php?page=xyz still work.

Pierre M.
bosserik
New Member
New Member
Posts: 7
Joined: Tue Jan 31, 2006 11:32 am

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by bosserik »

I know, but SEo is important and I want to avoid duplicate content pages (the menu shows the pretty url and the content link shows the page=XX linking scheme) and I want the keyword present in the link.

Therefore I need to replace all links. It's even more complicated since many of the page links are image links...

I guess I need to update by hand... :-(

Thanks for the comments.

/Tim
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by Nullig »

If you're comfortable using phpMyAdmin to export/import, you could export the content table to an sql file, edit it with a text editor, do a search and replace, then import it back into the db.

Nullig
bosserik
New Member
New Member
Posts: 7
Joined: Tue Jan 31, 2006 11:32 am

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by bosserik »

Well, I just did that, but I still had to manually make some kind of mapping where pageID was pageAlias.

Since both the pageID and the pageAlias is in the database I was hoping this could be done automatically...

Got it fixed now though...

Still, what happens when I change a page alias? I guess I still have to change all links made with the editor to this page manually as well? I love CMSMS but I consider this a pretty serious flaw. I am no php programmer, but my logic would say to me that this could be improved...

Thanks again for all the suggestions.

/Tim
Pierre M.

Re: Changing non-pretty URL links made in editor to pretty URL links?

Post by Pierre M. »

Hello,

I've just tested :
-created 2 pages, assigning them p1 and p2 aliases.
-put some texte in each, browse them, they are OK.
-inserted a link with the wysiwyg from the first to the second. The generated cms_selflink point to a page ID not the alias p2.
-browsing OK p1 and p2.
-edit second page option to change its alias from p2 to pN.
-everything still OK : cms_selflink works fine.

My conclusion : alias are kept coherent because internaly CMSms deal with page IDs to let us have/change the aliases as we want them.

Pierre M.
Post Reply

Return to “CMSMS Core”