I installed Apache for Windows. I bought CodeIgniter Professional and downloaded their source code. It said that I should put its .htaccess in the root folder of the website so I did. I set base URL to be http://127.0.0.1/kids/ where kids is the root folder of the website. It showed the homepage just fine. When I clicked on a link, it always gives the 404 error. It said, "The requested URL /index.php/welcome/cat/2 was not found on this server." I tried several possiblities of .htaccess in directories with no success. Inside the .htaccess, it instructs:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Explain why it's not working at all? I also checked configs.php and it seems ok as well. config['index_page'] is set to blank. I removed the .htaccess file and still same problem except that it said, "The requested URL /kids/welcome/cat/2 was not found on this server."
Hours have been wasted on trying to get it working and I am losing patience.
Here's the instruction from CodeIgniter Professional:
"To make those folders accessible to CodeIgniter, you will also need to create a small .htaccess file in the root folder of your web site. Here's what that .htaccess file would look like. It basically contains instructions that allmvs certain files and folders to be viewable on the web site:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
If you are familiar with mod_rewrite in Apache, you will note that this rule ostensibly removes index.php from the URL of any destination. Below when you're configuring CodeIgniter (and particularly the config.php file), you'll see why this is a good idea. If you're not familiar with mod_rewrite in Apache, don't be too intimidated by this file. Basically, the .htaccess file sets forth a few rules, one of which removes index.php from all URLs. Other rules in the file allow the use of various other folders that you will need going forward (such as folders that contain CSS, JavaScript, Captcha files, and images)."
I did just as instructed... put the htaccess file in root folder and yet, it gave 404 error. If I remove htaccess file from the root folder, it shows homepage. If I add htaccess file, it gives 404 error. I moved htaccess and it didn't do anything to re-route. Obviously, the Apache understood the htaccess otherwise it wouldn't show the 404 error.