mulitple urls for one listing

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 10, 2011   (RSS)

Hello,
Right now there are multiple urls that point to each listing on our site for example:

http://www.rentittoday.com/medical-equipment-rentals/Detroit-Medical-Equipment-Rental---Drager-Narkomed-2C-System---Michigan-Anesthesia-Machine-Rentals-2421
http://www.rentittoday.com/medical-equipment-rentals/item_number=2421
http://www.rentittoday.com/medical-equipment-rentals/2421http://www.rentittoday.com/medical-equipment-rentals/num-2421
Basically, anything that has "medical-equipment-rentals" and the item number in it, will take you to that page. We are wanting to "contain" this, if you will, by limiting the number of urls that will bring a user to a certain listing. We would really like only the first url listed above, that uses the listings name and number, to actually go that particular lisiting. Is there a way to accomplish this in CMS? Or is this more of a modRewrite issue?

Thanks !
Jason Glass

Re: [rentittoday] mulitple urls for one listing

By Jason - January 5, 2011

Hi,

How are you getting these different versions of the url? There are two ways to accomplish what you're looking for. One is to set up the Viewer Url section in each of your section editors. Then when need a url to that page, use the ['_link'] pseudo field.

The other way is to always manually create your url, but to do it the same way each time.

For example:

<a href="http://www.rentittoday.com/medical-equipment-rentals/<?php echo str_replace(" ","-",$record['name'])."-".$record['num'];?>">*LINK TEXT*</a>

Does this seem like what you're looking for?

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] mulitple urls for one listing

These different URL versions are popping up in our Google analytics. We are careful to setup links to our site from out on the web in the way we want them to appear. So we are not really sure how the robots and crawlers are coming across them.

Across the site now we use the ['_link'] to create the links from our results to details pages. We have changed parts of the Viewer URL section to create the links with the ['name'] field "/" ['num']. They create the link how we want them to be and we use a mod rewrite to change in the path info, as to have "medical-equipment-rentals" instead of "viewers/medical_equipment_rentals.php"
We do know how to create the "custom links" (we found info on another of the forum posts). Which I believe is similar to the code you provided. But I guess as I think about it more, the only way to "prohibit" any of the other urls from being used would be to redirect all pages that were of the "unwanted urls" to the "desired urls". Although I do not know if this is really possible.

Basically, if someone went to:
http://www.rentittoday.com/medical-equipment-rentals/33

It would know to send them to:

http://www.rentittoday.com/medical-equipment-rentals/Orlando-Medical-Ramp-For-Rent---Florida-Healthcare-Equipment-Rentals-33
Jason Glass