Welcome Guest, Not a member yet? Register   Sign In
How can I canonize my site?
#1

[eluser]1234qwer[/eluser]
hello.

My site is pure code igniter but I`m having problems with canonization, since the home page can be accessed in several ways, for example:

www.site.com

www.site.com/

www.site.com/index.php

site.com

etc
But other more is:

www.site.com/index.php/banano/index/

And I want only one way to access the home page, and must be http://www.site.com/ and I want all other urls must be redirected to this one.

Then I found this page with very good information (in spanish)

Url Canónicas

Then my actual .htaccess is that:

Code:
RewriteEngine on

addtype application/x-httpd-php .html .htm



Rewritecond %{REQUEST_FILENAME} !-f
RewriteRule \.php$ /error404.html

RewriteBase /

RewriteCond $1 !^(\/|index\.php|system|application|iservices|mod_css|s eo|links|mod_img|mod_galeria|mod_scripts|includes| blog|adm_img|adm_css|resize|views|templates|img|im gs|js|css|images|tester|ecotourism|\/ecotourism\/gardens\/|system\/plugins|robots\.txt|language|css\/)


RewriteRule ^(.*)$ http://www.sitio.com/index.php/banano/index/$1 [L]



#RewriteRule ^email$ "http\:\/\/mail\.google\.com\/a\/sitio\.com" [R=301,L]
And I add this lines to the end of the htaccess

Code:
Options +Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sitio\.com
RewriteRule ^(.*)$ http://www.sitio.com/$1 [R=permanent,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.sitio.com/$1/ [L,R=301]

this fix the problem and all non www urls are being redirected to the www url, but now when i type: http://www.site.com/ it is redirected to

http://www.site.com/index.php/banano/index/

and I won´t that.

Can you help me with that canonization issue?

What I need is the home page only being accesible by http://www.site.com/

thanks


Messages In This Thread
How can I canonize my site? - by El Forum - 12-29-2009, 11:57 AM
How can I canonize my site? - by El Forum - 12-29-2009, 12:20 PM
How can I canonize my site? - by El Forum - 12-29-2009, 12:55 PM
How can I canonize my site? - by El Forum - 12-29-2009, 01:00 PM
How can I canonize my site? - by El Forum - 12-29-2009, 01:05 PM
How can I canonize my site? - by El Forum - 12-29-2009, 02:08 PM
How can I canonize my site? - by El Forum - 12-29-2009, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB