CodeIgniter Forums
HTACCESS file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: HTACCESS file (/showthread.php?tid=21125)



HTACCESS file - El Forum - 07-31-2009

[eluser]gandalf12[/eluser]
Hi ya

I have loaded a sample application on my website http://www.greenwitch.xtreemhost.com/codeigniter

problem is I think my .htaccess file is incorrect, here is what it looks like:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

also, does the chmod code matter?? I think I have chmod'd 775 to all files!!

Thanks for any assistance

Grant


HTACCESS file - El Forum - 07-31-2009

[eluser]Dam1an[/eluser]
try
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ ./index.php/$1 [L]

Notice the rewrite condition is reltive to the current directory instead of the web root (which is important as you have it in a folder called codeigniter in the root)


HTACCESS file - El Forum - 07-31-2009

[eluser]gandalf12[/eluser]
Hi Lab Technician

Thanks for the reply, I'll have to rethink my .htaccess file

Thanks again


HTACCESS file - El Forum - 08-01-2009

[eluser]Stallon[/eluser]
[quote author="gandalf12" date="1249091192"]

also, does the chmod code matter?? I think I have chmod'd 775 to all files!!
[/quote]

i think personally 655 is more secure depending on the host..


HTACCESS file - El Forum - 08-01-2009

[eluser]Kami_[/eluser]
[quote author="Stallon" date="1249142995"][quote author="gandalf12" date="1249091192"]

also, does the chmod code matter?? I think I have chmod'd 775 to all files!!
[/quote]

i think personally 655 is more secure depending on the host..[/quote]

Like he said (also, there is no point to chmod all the files to 775).

If PHP is running under the same user and group (which is a bad idea for shared hosting) for every web account and they don't use PHP open_basedir or similar OS level protection, it doesn't really matter.