Forum Moderators: open
/page/
/page/default.html
should all return the same result - always. If it does not then your server is improperly configured.
Easy fix on your end .
naturally *domain.com/* will show as *domain.com* looks cleaner and _should_ return the same result.
I was recently removed from yahoo COMPLETELY for a similiar such small and seemingly innocuous technical problem.
Better to redirect to the / than make it optional... depending on the structure of your pages/directories, you could use something like this:
RewriteRule ([^.]+[^/])$ /$1/ [R=301,L]
This will rewrite any URL that does not contain a .(dot) and does not end in a / to the same location with a /
Justin
this is a file on a domain:
http://yoursite.com/file
this is a directory on a domain:
http://yoursite.com/file/
this is a file on a sub-domain:
http://www.yoursite.com/file
this is a directory on a sub-domain:
http://www.yoursite.com/file/
They are 4 completely different, unique locations, and though they may (usually) contain the same information, they may also contain entirely different information. Therefore, SE's usually treat these *correctly* as different locations, and not an equal value that is expected to generate the same information.
So, yes, if you can access a single set of information in two different ways (URL paths) there is always the chance of duplicate content, because really, it is.
Justin
if((substr ($req, -1,1)!= '/')&&(substr ($req, -4,1)!=".")&&(substr ($req, -5,1)!=".")) $req.="/"; //It's added to solve / issue in url of Yahoo.
$sql="SELECT oldurl, newurl FROM #__redirection".
" WHERE oldurl".
" LIKE '".$req."'".
" LIMIT 1";
//die($sql);
$database->setQuery($sql);
It works beautifully, but I'm still worried that Google or MSN will take "page/" as not eqaul to "page" given this code and penalize me for dupe content. Unfortunatly, given the language and complexity of or SEO tools, we can't impliment some of the good sugesstions I've read.
My guess is, you will need to find the right reaction to the failed test, but it should be possible. (EG do you redirect immediately, or are there variables you need to set/adjust first? You should be able to do either, as long as you don not 'serve' any information prior to the redirect header.)
$uri=getenv("REQUEST_URI");
if(eregi("^([^.]+[^/]{1})$", $uri)) { header ("HTTP/1.0 301 Moved Permanently"); header("Location: $uri/"); }
Hope this helps.
Justin