Hello
Here is my problem
I have a codeigniter project working fine meaning the htaccess works.
it display the pages etc ... but when I tried my website to
fetch as google it appears I have too many redirects.
I found this webpage that better explain my problem
[link to tools snipped]
When I try this with my website I have
Final status code:: 302
19 Redirect(s)
http://example.com
302 redirect
http://example.com//metro
http://example.com//metro
302 redirect
http://example.com//metro
http://example.com//metro
[...]
which goes on and on : (
but visually when not checking my website as a google bot, the url is nice
example.com/en/montreal
here is my .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)/$ /$1 [R=301,L]
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
In my config file I tried all possibilities
here is my value
$config['uri_protocol']= 'AUTO';
and of course my index_page is
$config['index_page'] = '';
in routes
$route['default_controller'] = 'metro';
in metro controller
index
redirect(base_url().'Montreal', 'location', 302);
How can I get rid of this double slash right after the domain name ?
Thanks in advance
[edited by: phranque at 1:02 am (utc) on Feb 25, 2015]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]