Support Forums


Go Back   68 Classifieds Forums > Help & Support > Modules / Plugins / Modifications

Notices

 
LinkBack Thread Tools Display Modes
Old 10-21-2008, 04:07 AM   #1
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 120
Rep Power: 16
frommarcq is on a distinguished road
Default SEO : suggestion

Hi,

In SEO module, the URL are converted like this :

PHP Code:
www.name-of-the-site.com/listing/id-number/title-of-the-listing.html 
I'm note sure it is the best way to SEO. The reason : if the Search engine searches such an url :

PHP Code:
www.name-of-the-site.com/listing/123/my-old-car.html 
The search engine will understand that /123/ is a folder, and will automatically try to browse it, causing 404 errors.

The fix ?

I've changed in Listings.php
PHP Code:
$row['link']="listing/".$row['id']."/".$listing_title.".html"
with
PHP Code:
$row['link']="listing-".$row['id']."-".$listing_title.".html"
and in .htaccess
replace the line after
PHP Code:
#view listing 
with
PHP Code:
RewriteRule ^listing-([0-9]+)-([0-9a-zA-Z_-]+).htmlviewlisting.php?view=$[NC
The URL will be displayed ike this :
PHP Code:
www.name-of-the-site.com/listing-123-my-old-car.html 
No 'virtual' folders, and 404 errors from Search engines will disappear...

Regards

Pascal
__________________
68classifieds (V4.0.9Developer)
frommarcq is offline   Reply With Quote
Old 10-22-2008, 11:32 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,166
Rep Power: 30
seymourjames has a spectacular aura about
Default

This is a great solution because there is another ramification to virtual folders - it is possible to generate millions of duplicate urls.

Another mod needed is to do the same for categories. Have a look at that one.

There is one little problem though - I think changes will be needed to the featured and horizontal listings modules. I know for sure the ones I did with some css styling for featured and latest listings with the SEO module in force will need changing. Here is the change in those plugins. It turns out to be simple.

$link="listing-".$loop[$ads][id]."-".$listing_title.".html";

I think the default plugins for horizontal and vertical featured listings etc will also need this change.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 10-23-2008, 05:15 PM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,166
Rep Power: 30
seymourjames has a spectacular aura about
Default

Thinking about this a little more. Would it be best to shorten completely but making sure to retain unique urls

/listingtitle-idnumber.html

If so what would you suggest changing. This needs to be changed below but so does the .htaccess.

$row['link']="listing-".$row['id']."-".$listing_title.".html";

I tried adjusting the .htaccess and this line above but it would not then find the adverts at all. Perhaps finger trouble. I tried


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


and

$row['link']="".$listing_title."-".$row['id'].".html";
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote
Old 10-24-2008, 06:30 AM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,087
Rep Power: 117
Eric Barnes is a jewel in the rough
Default

I would think this would work:
RewriteRule ^listing-([0-9]+)-([0-9a-zA-Z_-]+).html$ viewlisting.php?view=$1 [NC]
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 10-24-2008, 01:33 PM   #5
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,166
Rep Power: 30
seymourjames has a spectacular aura about
Default

Morning.

We got that far but I was trying to go one step further and get rid of the word listing and put the id at the end.
__________________
TemplateCodes.com
seymourjames is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mod suggestion atom v4 Questions & Support 1 07-01-2008 07:05 PM
Bug and Suggestion cwp v4 Questions & Support 0 12-04-2007 04:16 PM


All times are GMT -4. The time now is 09:39 PM.


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