![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
IP: 112.87.93.182
|
|||
|
|||
|
Google Webmasters recently provided a tutorial on utilizing slashes in urls: To Slash or not to slash.
If using our CDSEO for X-Cart search engine optimization X-Cart mod or the default X-Cart clean urls, you likely have folder urls for categories and/or manufacturers, and you may or not be utilizing slashes correctly. Search engines will see a url with a slash as a folder, and without a slash as a file, as follows: http://www.example.com/some-directory <- file http://www.example.com/some-directory/ <- folder What's more important than which method is used, is that both of these urls not be used to access the same content. Instead you want pick one url format and 301 redirect the secondary url to the primary. I recommend using the conventional folder format as provided by CDSEO. You can then ensure that the the url without a slash is 301 redirected to the url with a slash using this code at the top of your .htaccess file: Code:
# WCM - Force trailing slashes
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
# / WCM - Force trailing slashes
http://www.example.com/some-directory -> Status: HTTP/1.1 301 Moved Permanently http://www.example.com/some-directory/ -> Status: HTTP/1.1 200 OK You can see this working on our site by testing the following urls: http://www.glassespeople.com/eyeglasses http://www.glassespeople.com/eyeglasses/ |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 有关Zen Cart的一些常用操作 | yahoo | ZenCart | 0 | 2009-12-01 09:36 PM |
| How to Install an Zen Cart Template | topvip | ZenCart | 0 | 2009-08-23 05:35 PM |
| X-Cart Multiple Input Validation Holes Permit SQL Injection and Cross-Site Scripting | topvip | X-Cart | 0 | 2009-07-21 10:03 AM |
| x-cart Template Editing Guide for 4.1.x | topvip | X-Cart | 0 | 2009-04-15 11:42 PM |
| 3 Free Ways to Shorten Affiliate URLs | topvip | 网赚研究院 | 0 | 2007-08-17 01:23 AM |