Welcome Guest, Not a member yet? Register   Sign In
Issues with .htaccess with codeigniter...
#1

[eluser]broyd[/eluser]
Hello everyone,
I've tried many different solutions, read a lot all over google and I just cannot seem to understand the issue here, maybe i'm blind for looking for solutions for too long and the answer is right under my nose and i'm too blind to see, I bet it's a joke and very easy too, but here it goes.

I'm runing a script that uses Codeigniter in a subfolder, and with this script I have an .htaccess:

Code:
AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|install|img|smarty|images|scripts|fonts|uploads|css|js|robots\.txt|sitemap\.xml|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule (.*)-(.*)\.html$ articles/show/$2
RewriteRule (.*)-(.*)/$ categories/show/$2
RewriteRule /cat_articles/(.*)-(.*)\.html$ categories/articles/$2
RewriteRule (.*)-(.*)\/(.*)$ categories/show/$2/$3
ErrorDocument 404 /404.php
Options -Indexes

Now the issue is the following: When I put a new file in the folder like say test.php and i try to go to it http://www.site.com/test.php I get 404 error and I cannot get the file to load. This happens even if I try to get into a newly made folder http://www.site.com/test/test.php same thing happens.

The odd thing is tho, the files/folders that come with the script work fine, such as http://www.site.com/contact - /login - /register etc but anything I make goes to 404...

When I remove the .htaccess I can access the files / folders then but obviously the structer of the URL is messed up and does not work anymore.

Any help would be appreciated!

EDIT: Sorry, forgot to mention, the config.php is set:

Code:
$config['uri_protocol']    = "ORIG_PATH_INFO";

it's the only method that works, atleast with that .htaccess on Hostgator.


Messages In This Thread
Issues with .htaccess with codeigniter... - by El Forum - 05-07-2009, 04:28 PM
Issues with .htaccess with codeigniter... - by El Forum - 05-08-2009, 09:24 PM
Issues with .htaccess with codeigniter... - by El Forum - 05-08-2009, 09:41 PM
Issues with .htaccess with codeigniter... - by El Forum - 05-09-2009, 08:25 AM
Issues with .htaccess with codeigniter... - by El Forum - 05-11-2009, 12:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB