Welcome Guest, Not a member yet? Register   Sign In
SEO, URI's and routing.... Best practices?
#4

[eluser]boltsabre[/eluser]
In your base controller folder create/edit the index.php controller file... this is your home page. Put all your homepage functionality in the index method inside the index.php controller (index methods run by default when no other methods are called).

Use .htaccess to do a 301 permanent redirect from www.domain.com/index.php to www.domain.com.

You can get clever and put other functions in your index.php controller (how about "privacy_policy", or "contact_us", basically all your static site wide pages, so that the urls will look like "www.domain.com/contact_us").

This fixes all your problems in a 100% safe (including SEO) way. A 301 redirect tells google that "this page does/did exist, but it has been permanently moved to the new url, for all intents and purposes ignore this page, and please visit and pass any existing link juice to the new url.

On a side note... you should also pick a preferred url structure (with our without www. and if you will have a type extension such as .html, .htm, .php). I'd personally forget the type extenstion, and suggest this structure: www.domain.com/somecontroller/somemethod/somevarialbe

Again use your .htaccess to perform 301 redirects on all pages/links/urls without www. to www., I'd also 301 all pages with trailing slashes to a url with it removed.

Then... once you have your preferred url structure USE IT EVERYWHERE and NEVER use something else... if you're giving your url to someone so they can link to you, give the the correct version!

A 301 from an incorrect url to the correct one will loose a little link juice, and it also requires a little extra server processing time, thus reducing page load speed.


Messages In This Thread
SEO, URI's and routing.... Best practices? - by El Forum - 07-05-2012, 01:44 PM
SEO, URI's and routing.... Best practices? - by El Forum - 07-05-2012, 04:04 PM
SEO, URI's and routing.... Best practices? - by El Forum - 07-05-2012, 05:34 PM
SEO, URI's and routing.... Best practices? - by El Forum - 07-06-2012, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB