Search Friendly URLs

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 8, 2008   (RSS)

When I use $options['useSeoUrls'] = '1'; it returns http://products.php/1/ which is a broken link instead of http://www.mellinger-co.com/products.php?1/ that the $options['useSeoUrls'] = ''; produces. What am I doing wrong please. Also AM produces SE friendly URLs like http://www.tradezone.com/articles/global-business/Ten_Tips_for_Translating_Your_Business_Card_16.php. for each page your create. CMS produces products.php?1/2/3 etc which definitely is not what I am looking for. The client should be able to name each page in a section the way he wants it to appear. Of course I may be missing something here since I am just learning the program.[/#333366] [/#333366] Also, can I call from separate tables on one page? $options['tableName'] = 'products'; calls from products table, how would I add the ability to call from a second table to use the fields in that table also on the same page?[/#333366] [/#333366] Thanks you for your time and efforts.[/#333366]

Re: [Dave] Search Friendly URLs

Thank you, that fixed it.

I am not sure why you formated your seo urls to section.php/name-1/

To me this looks much better for SEO. section.php/name.html
however that is just little ole me talking.

Why not make it look like this using the $options['titleField'] = 'name'; function?
http://www.mellinger-co.com/products.php/Garden_Shears.html

instead of like you do it. http://www.mellinger-co.com/products.php/Garden_Shears-1/

In the viewer_functions.php file
// Mod here took away the "-"
if ($extraUrlDetails) { $extraUrlDetails .= ""; }

and changed this line
$record['_link'] = $options['viewerUrl'] . $urlDelimiter . $extraUrlDetails . ".html";

Not sure yet if I created in trouble for myself by doing that but it looks nice to me = ) Yes it is nice that you can do things the way you want with your program and thank you for that. Your forum response is excellent and you have always provided great service for Article Manager which I love dearly.

Re: [Glasairmell] Search Friendly URLs

By Dave - February 8, 2008

Glad it's working!

For the SEO urls we need something unchanging that we can use to identify the record. The dash number ("title-1") on the end is the record number we use. So even if the user changes the title - urls with the old and new titles will still work because they'll have the same record number of the end.

I know the number part isn't the nicest, but it made the most sense for general use. If you knew you were going to have a "filename" field you can make it unique and required and use that as a lookup (instead of the number) with a bit of PHP code and you wouldn't need the number.

Also, adding .html instead of the slash on the end is totally fine. I've even thought about adding an option for that, we just hadn't done it yet. Another trick you can do is to use .htaccess or mod_rewrite (on Apache) to drop the .php part of the filename so it's just /products/Garden_Shares-1.html

Best of luck with your site, let us know if you have any other questions.
Dave Edis - Senior Developer
interactivetools.com