Closed GoogleCodeExporter closed 9 years ago
One of the things I did was change my .htaccess to read the following:
RewriteRule ^([A-Za-z0-9-]+/)?([A-Za-z0-9-]+)/?$ index.php?id=$2 [L,QSA]
This will allow only a maximum number of 2 slugs. Doesn’t fix it in any other
way
though, as GetSimple will still need a check whether the first one is the
parent slug
or not. Another thing is that you will no longer be sure that wrong URLs are
send to
your 404, this because URLs with more than 2 slugs will not be rewritten at all
and
will be fed the server’s 404.
Do you think we actually need a check on the URL? Having a canonical URL
specified on
the page would fix the problem as far as SEO is concerned, right?
Original comment by martijn.personal@gmail.com
on 20 Feb 2010 at 9:37
Can we rely on canonical though? Duplicate content is something people will
always be
concerned with. But that said - i am not sure this problem is worth the amt of
work it
will be to check each page request that comes in for a correct parent.
Original comment by ccagle8
on 21 Feb 2010 at 12:36
This should not be much work. You just would have to add some check in
index.php,
something like this:
if($_SERVER['REQUEST_URI'] != $data_index->parent . '/' . $data_index->url)
header('Location: ' . $data_index->parent . '/' . $data_index->url);
Of course you should do add something else for sites that are not hosted in the
root
of the domain, and the extra query string parameters.
Original comment by mel...@gmail.com
on 29 Mar 2010 at 4:15
This issue was closed by revision r136.
Original comment by ccagle8
on 17 Apr 2010 at 2:44
Thanks Melado - It's taken me a while, but a version of what you gave me worked
perfectly. Thanks!
Original comment by ccagle8
on 17 Apr 2010 at 2:45
Original issue reported on code.google.com by
ccagle8
on 18 Jan 2010 at 9:15