The issue here is that search engines consider the following two locations as distinct pages:

In the case above, the solution is simple and many posts offer such a solution to add a slash to the end of the url. But, what happens when you have the following?

This is an actual page (not a folder or directory) which simply doesn't have an extension (common in many Content Management Systems). Your global redirect commands will force a redirect to the following, which would return a 404.

In this case, we'll want to specify manually which locations should be given "the slash treatment". Note, directives below are for the Apache web server (you can place these in a virtual host stanza, or in your .htaccess file)

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} ^/(products|services|about|contact)
RewriteRule (.*)$1/ [R=301,L]


Leave a Reply

Your email address will not be published. Required fields are marked *