augustin
(Rmlodzki)
May 4, 2010, 7:30pm
1
I’ve got now quite pretty urls in form
"example.com/cities " or
"example.com/city/madrid "
and this is good.
But if I go to
"example.com/index.php?r=city/index " or
"exapmle.com/index.php?r=city/view&name=madrid "
I get the same pages too. And that’s not so good (duplicate content in google). What is the best way to resolve this issue?
regards,
Augustin
mdomba
(Maurizio Domba Cerin)
May 4, 2010, 7:48pm
2
I don’t see a problem…
if you don’t have anywhere a link to ex. example.com/index.php?r=city/index , then how would google even find that out…
augustin
(Rmlodzki)
May 4, 2010, 7:55pm
3
i conducted a small experiment – i had a website with no incoming links at all (0 incoming links), and i visited it few times with browser with google toolbar… it was sufficient to get it indexed.
i don’t think so, that someone will visit directly “example.com/index.php?r=city/index ” but “example.com/index.php ” is quite possible (eg. someone is just curious if this great site is made with php)).
what is the best way to hide "index.php" from user? naive use of .htaccess could lead to 301 rediraction circle.
mdomba
(Maurizio Domba Cerin)
May 4, 2010, 8:08pm
4
Y11
(Y!!)
May 4, 2010, 8:21pm
5
Enable strict parsing in config.
augustin
(Rmlodzki)
May 4, 2010, 9:05pm
6
that was what i was looking for. thank you amigo!
and what to do to "example.com/index.php " give back 404 or 301-redirect to example.com ?
zitter
(Zitter)
May 4, 2010, 9:05pm
7
@augustin : to hide index.php look at "hiding index.php" section in http://www.yiiframework.com/doc/guide/topics.url
augustin
(Rmlodzki)
May 4, 2010, 9:22pm
8
i made it already – urlmanager generates url without index.php, but still if i write "example.com/index.php " i get my homepage. one should rather change something in .htaccess and most probaly also somewhere else.