“I work for Erskine Design in Nottingham. Which is nice. You've got choices, you can visit my homepage, take a look at the available downloads or view the blog archives. Please contact me whenever you like. Also, why not subscribe to the RSS feed.”
When I transferred this site over from Wordpress I lost a load of codeigniter content, It was probably the most searched for stuff - unfortunately I don’t really remember what a lot of it was, I do remember there was a short .htaccess/remove index.php tutorial so I thought I would post something quickly for people who follow old links etc.
This is a .htaccess file that rewrites all requests through index.php unless the requested url actually exists. You couldreplace /index.php with any filename (dispatch.php, router.php) whatever. Put the file in your CI document root. mod_rewrite must be enable in your httpd.conf file for this to work. Search for ‘mod_rewrite’ in your httpd.conf file and remove the comment ‘#’. A lot of shared hosts have this enabled by default.
If you are developing on http://localhost/mysites/cool_new_site/index.php make sure you set the redirection (line 4) in the .htaccess file to ‘/mysites/cool_new_site/index.php’ or you will get a 500 server error.
Brent Mawhinney ~ Tuesday, Jan 29th 2008 @ 11:39:26
Bravo.. Nice fix with the mod_rewrite pointer. This is NOT in the codeigniter sire or a couple of other tutorials I’ve been using. They just save to drop in the .htaccess file but never where. I finally found an external ref that said htdocs but no tweak for the mod_rewrite. Using Apache, MySql, PHP and trying to pickup Codeigniter to use with xajax.