Welcome to WebmasterWorld Guest from 188.8.131.52
? Google Webmaster tools sees them as separate pages and I am trying to stave off a dupe content penalty....
I only need it for that one URL, not a blanket rule.
One way is:
RewriteRule ^somepath$ http://www.example.com/somepath/? [R=301,L]
Be aware that order of processing may not be what you expect if you have other redirects on your site, and those redirects use
in them. Use
for all of them.
Include it only of the rule is going into the httpd.conf file.
You are also almost always better off redirecting to strip trailing slashes from extensionless URLs, rather than adding them
URLs without a trailing slash - when they match a real folder name in the filesystem - are redirected to add that slash back on.
An extensionless URL should be just that, ending in nothing (no extension, no dot, and no trailing slash either).