Yet another htaccess post (why isn't this taken care of by default?) |
[eluser]welzie[/eluser]
I have read post after post, but still get 404 without "index.php" in my urls. Using apache 2.2.8 php5.2.5 windows xp Here is my file setup c:/apache/htdocs/myApplication/index.php c:/apache/htdocs/myApplication/.htaccess c:/apache/htdocs/myApplication/system (codeIgniter code pasted from zip file) config.php values $config['index_page'] = "index.php"; $config['base_url'] = "http://127.0.0.1/myApplication/"; P.S. An example project would be useful to learn common config settings like htaccess, etc.
[eluser]avinashv[/eluser]
That is most definitely the first thing you want to do. Post your htaccess here to make sure, once your cleared 'index_page' and if it still fails, there aren't any problems there.
[eluser]Michael Wales[/eluser]
It's not automatically taken care of because every server is configured differently and some of us (/me raises hand) don't even use Apache. The most common solution, commonly referred to the WordPress .htaccess file (among circles outside of CI) is provided in the documentation.
[eluser]welzie[/eluser]
Finally got it to work thanks to a very helpful wiki post. Here is how I fixed my Apache htaccess problem. 1)Follow these instructions from this wiki post (this article should really be linked to from the main manual IMHO): http://codeigniter.com/wiki/mod_rewrite/ 2)Make sure to include your application name in the part of the .htaccess file that forwards to index.php. See below. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ myApplication/index.php/$1 [L] </IfModule> P.S. No response to my suggestion for a sample application? @michael Wales, understood that some people use IIS(feel sorry for those people) or another server besides apache. But since a LARGE majority use apache wouldn't it benefit the project to have a little more documentation on the htaccess mod_rewrite subject? |
Welcome Guest, Not a member yet? Register Sign In |