Welcome Guest, Not a member yet? Register   Sign In
New Code Igniter tutorial series
#18

[eluser]bennyhill[/eluser]
[quote author="Daniel Moore" date="1211244409"]Dam1an,

Always great to see tutorials up that are needed to help people get up to speed on CodeIgniter.

If I may quote you, you said, "Be as harsh as you can, as the more you point out, with regard to Codeigniter and the style of the tutorial, the better it will be for everyone." (If I can't quote you, well you still said it.)

As I assume you are looking for "constructive" criticism so that you can make it the best possible tutorial for all users, I have noticed something in your .htaccess tutorial that could use addressing.

Your .htaccess tutorial will not work for all installations for CodeIgniter. Everyone I work with, and many people in the hard core programming world, prefer the added security of placing the /system directory outside the web root, and some have multiple code igniter applications at a particular site. You have written the following rewrite rule:
Code:
RewriteRule ^(.*)$ /index.php/$1 [L]
This will not work for many installations, as it assumes the index.php is in the root directory, which it is not always in the root, especially on development machines where you may be developing multiple CI applications. It would be better to write it as:
Code:
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
As you can see, I use a dot before the slash before the index.php to tell the rewrite rule to look relative to the current directory. It works flawlessly.

I work on multiple servers, with multiple versions of apache. Some older versions do not behave well with the .htaccess you have, and and this issued has been solved across all apache servers by using the following .htaccess file:
Code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Good luck with the tutorial series![/quote]

I copy and pasted your code into an .htaccess file and placed it in the root folder of my website. I made sure that in my http.conf file that I had "AllowOverride all" set properly. Also, I edited the config.php file as you requested. However, I get a 500 error page. When I remove the .htaccess file from my website root and refresh the browser everything works fine. Is there and error with this .htaccess file?


Messages In This Thread
New Code Igniter tutorial series - by El Forum - 05-18-2008, 02:34 PM
New Code Igniter tutorial series - by El Forum - 05-18-2008, 06:09 PM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 01:41 AM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 02:32 AM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 05:31 AM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 06:05 AM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 06:35 AM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 01:46 PM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 02:42 PM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 05:28 PM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 11:55 PM
New Code Igniter tutorial series - by El Forum - 05-19-2008, 11:58 PM
New Code Igniter tutorial series - by El Forum - 05-20-2008, 11:17 AM
New Code Igniter tutorial series - by El Forum - 05-20-2008, 12:03 PM
New Code Igniter tutorial series - by El Forum - 05-20-2008, 12:44 PM
New Code Igniter tutorial series - by El Forum - 05-20-2008, 02:02 PM
New Code Igniter tutorial series - by El Forum - 05-20-2008, 02:28 PM
New Code Igniter tutorial series - by El Forum - 05-27-2008, 07:55 AM
New Code Igniter tutorial series - by El Forum - 05-27-2008, 08:12 AM
New Code Igniter tutorial series - by El Forum - 05-28-2008, 10:08 AM
New Code Igniter tutorial series - by El Forum - 06-14-2010, 02:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB