Welcome Guest, Not a member yet? Register   Sign In
Need help with CI and .htaccess
#1

[eluser]bigg-media[/eluser]
I have a website that I am working on.

The important part of my .htaccess
Code:
RewriteEngine On
  RewriteRule ^index.html$ home.html [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index\.php|crm|system)
  RewriteRule ^(.*)$ index.php/home/index/$1 [L]

I have a main controller home that all pages are run through. I did this since when we built the site, they wanted all preexisting pages mapped to the new pages. (ex. resslaws.html needs to map to /system/application/default/view/default/content/resslaws.php which is pulled view the home controller).

Now my problem. I am creating a simple crm system for the client. I started with a separate crm folder under application with it's own config files, templates, etc. No matter what I do, when I try to access this new app, I get a 500 error, but the error message is shown inside the template of the first app.

The error log shows a premature ejaculation of the headers (premature end of script headers). I have checked all of my scripts for the whitespaces before and after php tags, and can't seem to find any.

I have now moved a separate instance of CI to a crm folder under root and the same problems still exist. I also tried to just run the new app as a controller using the new template within the existing CI app. No luck that way either.

If I disable Rewrite, I still get the 500 error, so there are issued besides the fact that it is pulled through the other template.

initial setup
index.php
crm.php
system
-application
--crm
--default

now
crm
-index.php
-system
--application
---crm
system
-application
--default
index.php


The site is hosted on lunarpages.

Any help would be appreciated.

Brent
#2

[eluser]marcoss[/eluser]
Try this, in your root directory place this .htaccess:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /crm/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

and this one in the crm one,

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /crm/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>




Theme © iAndrew 2016 - Forum software by © MyBB