Welcome Guest, Not a member yet? Register   Sign In
Pages are getting indexed multiple times
#1

[eluser]Unknown[/eluser]
Sorry if this is in the wrong place, but I've come across a problem. I hope to build a cms system myself on the CI framework, but for now, I'm making static pages.

I'm using views to make a generic header and footer and then a page for the content. Then putting these three in a controller.

Now on google, if I search my domain I get the following results:

mydomain.com/index.php
mydomain.com/contact.php
mydomain.com/contact
mydomain.com/

I don't want two versions of the same page to show up, but the biggest problem is that when you go to mydomain.com/contact.php it goes to 404

What do you think my best option is. Would forcing a suffix of php on each page solve the problem?

Thanks in advance.
#2

[eluser]mdvaldosta[/eluser]
You should use .htaccess to 301 redirect mydomain.com, mydomain.com/index.php, www.mydomain.com, www.mydomain.com/index.php all to mydomain.com/ (or www.mydomain.com/, whichever you prefer). As for the contact page, again you want to use whichever extension you've chosen and 301 redirect others to that one.
#3

[eluser]Unknown[/eluser]
That makes a lot of sense. Thank you for your help, I'll try it out now Smile




Theme © iAndrew 2016 - Forum software by © MyBB