CodeIgniter Forums

Full Version: HTACCESS file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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)

El Forum

[eluser]gandalf12[/eluser]
Hi Lab Technician

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

Thanks again

El Forum

[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..

El Forum

[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.