Page 1 of 1

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

Posted: Tue Apr 29, 2008 12:05 pm
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

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

Posted: Tue Apr 29, 2008 3:42 pm
by calguy1000
if you're using {cms_selflink ...} to create your internal page links all you should need to do is clear you cache.

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

Posted: Tue Apr 29, 2008 6:43 pm
by Pierre M.
Hello,

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

Pierre M.

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

Posted: Tue Apr 29, 2008 8:49 pm
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

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

Posted: Tue Apr 29, 2008 8:53 pm
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

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

Posted: Tue Apr 29, 2008 10:53 pm
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

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

Posted: Wed Apr 30, 2008 3:31 pm
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.