.htaccess weird happenings! |
[eluser]brancher[/eluser]
hi I have successfully removed index.php from my site. (viveiroarboreto.com.br) But one thing is going very very weird: for all addresses of the site, everything is going fine, except for the arboreto controller: when pointing to viveiroarboreto.com.br/arboreto, it shows not arboreto but the default controller (welcome), like if I were pointing to the home page! my htaccess file: RewriteEngine on RewriteBase / RewriteCond $1 !^(index\.php|public|robots\.txt) RewriteRule ^(.*)$ /index.php?/$1 [L] and on config.php: $config['base_url'] = "http://www.viveiroarboreto.com.br/"; $config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI"; any clue? thanks! [edited: I think the problem is on htaccess because pointing to viveiroarboreto.com.br/index.php/arboreto, everything goes just fine!]
[eluser]TheFuzzy0ne[/eluser]
Looks like the third line down is incorrect. Try this: RewriteCond %{HTTP_REFERER} !^/(index\.php|public|robots\.txt) or this: RewriteCond %{HTTP_REFERER} !^(index\.php|public|robots\.txt)
[eluser]Nevio[/eluser]
Code: # Make index.php the directory index page This is the best I find out on web in my case well... Works on every platform correctly.
[eluser]Daniel Moore[/eluser]
Nevio, your .htaccess is very good, but will not work on 100% of platforms. I have run across a rare quirk which will require the use of "Options -MultiViews" in some cases. Also, some hosts, like GoDaddy and a few others, require a "?" after index.php. The following is my standard .htaccess which is easily adapted for use on all systems. I have yet to use it at a location where I could not get it to work. This adaptation also gives me the option of placing a CI app in a subdirectory off the main root URL. @brancher: I noticed you used the "index.php?" method in your .htaccess. Try it with and without the ? to see which works for you. Code: # Code Igniter .htaccess file for the main index.php directory I am always open to suggestions for improvement if anyone sees it.
[eluser]brancher[/eluser]
nope... I have tried all options and no one got the job done. Things still working the same way... it redirects ok for all the site, except for viveiroarboreto.com.br/arboreto... can the problem be in somewhere else? I thinks it`s htaccess because using /index.php/ things are working just fine... tks
[eluser]Daniel Moore[/eluser]
[quote author="brancher" date="1238778523"]nope... I have tried all options and no one got the job done. Things still working the same way... it redirects ok for all the site, except for viveiroarboreto.com.br/arboreto... can the problem be in somewhere else? I thinks it`s htaccess because using /index.php/ things are working just fine... tks[/quote] Open up your application/config.php and find the line that contains "$config['uri_protocol'] =". Check the value. Try each of the values listed in the comment above it one at a time ('AUTO', 'PATH_INFO', 'QUERY_STRING', 'REQUEST_URI', and 'ORIG_PATH_INFO') and see if that fixes the problem. Also make sure that config.php file has Code: $config['index_page'] = "";
[eluser]brancher[/eluser]
Wow! You did it, boy! Setting it to AUTO got it done! thanks! |
Welcome Guest, Not a member yet? Register Sign In |