Support Forums

Change urls

This is a discussion on Change urls within the Technical Support forums, part of the Technical Support Forums category; Hi, How can i change "http://www.damiun.nl/categories/fotocameras.html" to http://www.damiun.nl/categories/fotocameras/ ' And "http://www.damiun.nl/listing/26/Test_status.html" to "http://www.damiun.nl/26_Test_status.html" Thanks Dominick...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 07-21-2009, 11:29 AM   #1
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 418
Rep Power: 14
damiun is on a distinguished road
Default Change urls

Hi,

How can i change "http://www.damiun.nl/categories/fotocameras.html" to http://www.damiun.nl/categories/fotocameras/'

And "http://www.damiun.nl/listing/26/Test_status.html" to "http://www.damiun.nl/26_Test_status.html"

Thanks
Dominick
damiun is offline  
Old 07-21-2009, 01:40 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

For the first you can edit the seo module hooks.php file. Remove the .html on these lines:
Code:
"categories/\\1/sort/\\2/order/\\3/page/\\4.html",
        "categories/\\1/sort/\\2/order/\\3.html",
        "categories/\\1/page/\\2.html",
        "categories/\\1.html",
        "categories.html",
        "categories.html",
Then edit the .htaccess and remove the .html for the categories.

For the second one that is not easy and would need some type of directory so it knows where to look. The "listings/" part.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 07-21-2009, 07:54 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,675
Rep Power: 65
seymourjames is a jewel in the rough
Default

For the second one I did this as it just gets too complicated to eliminate the listing and number of the ad directly, without creating an expired ad.

A Delightful French Property :30

using this

RewriteRule ^listing-([0-9]+)-([0-9a-zA-Z_-]+).html$ viewlisting.php?view=$1 [NC]

This was for 4.09 and I then had to modify several other files where ever the url was being explicitly constructed.

It will work in 4.1.X if you simply go into the hooks file of the SEO module and change this

$string="listing/".$row['id']."/".$string.".html";

to this

$string="".$row['id']."-".$string.".html";

or even this

$string="".$row['id'].$string.".html";


and then in .htaccess you put this

RewriteRule ^([0-9a-zA-Z_-]+).html$ viewlisting.php?view=$1 [NC]


You will then have to check all your plugins like horizontal listings etc. No guarantee it will work but it did for me when I tested it very briefly. This way you do end up with something simpler. Not sure there is any real advantage if you are concerned about SEO. More likely to just make upgrades more complicated for you in the future. The advantage of directory elimination in the url is negligible. Search engines care about content.


You will however arrive with urls like this with just the number in the url.

http://mydomain.com/14-myadtitle.html

or in the second case like this

http://mydomain.com/14myadtitle.html

The problem is if you try to remove the number, you will get an expired advert. It actually brings up a complicated subject of avoiding multiple urls to the same content and the need for uniqueness - that certainly does have an SEO effect. That number is basically preventing somebody entering an ad with the same title which would create an identical url. Clearly you can see that would not work ?
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Canonical URLs Eric Barnes Modification Release 0 03-13-2009 11:06 AM
Urgent Regarding SEO Urls.. cathouse911 Technical Support 11 11-20-2008 01:27 PM
problems with categories urls seymourjames Modules / Plugins / Modifications 1 04-30-2008 06:09 PM


All times are GMT -4. The time now is 01:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0