CodeIgniter Forums
CI On Subdomain Configuration? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: CI On Subdomain Configuration? (/showthread.php?tid=62849)



CI On Subdomain Configuration? - johnhalbert - 09-02-2015

Is the configuration for installing CI on a subdomain any different?
Everything works fine when developing on my localhost, but when I move on to my server it can't find my models.
My thought was maybe something to do with the subdomain. I set up the Base URL as the subdomain, but still no luck.
Is there something special to do here?


RE: CI On Subdomain Configuration? - pixel - 09-02-2015

(09-02-2015, 07:57 AM)johnhalbert Wrote: Is the configuration for installing CI on a subdomain any different?
Everything works fine when developing on my localhost, but when I move on to my server it can't find my models.
My thought was maybe something to do with the subdomain.  I set up the Base URL as the subdomain, but still no luck.
Is there something special to do here?

I think The configuration is the same.
How do you know that the problem come from of yours models ?

May be you forget to set up your file database.php located in folder config.


RE: CI On Subdomain Configuration? - johnhalbert - 09-02-2015

CI is giving me an error: An Error Was Encountered - Unable to locate the model you have specified: Appointment

This works fine on localhost, and yes the database.php is configured properly.  My thought was CI was looking for the file in the wrong place, possibly on the primary domain.  Don't know if this has something to do with mod rewrite rules.  Those are:


Code:
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /

   #Removes access to the system folder by users.
   #Additionally this will allow you to create a System.php controller,
   #previously this would not have been possible.
   #'system' can be replaced if you have renamed your system folder.
   RewriteCond %{REQUEST_URI} ^system.*
   RewriteRule ^(.*)$ /index.php?/$1 [L]
   
   #When your application folder isn't in the system folder
   #This snippet prevents user access to the application folder
   #Submitted by: Fabdrol
   #Rename 'application' to your applications folder name.
   RewriteCond %{REQUEST_URI} ^application.*
   RewriteRule ^(.*)$ /index.php?/$1 [L]

   #Checks to see if the user is attempting to access a valid file,
   #such as an image or css document, if this isn't true it sends the
   #request to index.php
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
   # If we don't have mod_rewrite installed, all 404's
   # can be sent to index.php, and everything works as normal.
   # Submitted by: ElliotHaughin

   ErrorDocument 404 /index.php
</IfModule>



RE: CI On Subdomain Configuration? - pixel - 09-03-2015

For me it's only a problem with the model: CodeIngniter doesn't find it... so why ?

when you search your problem with google you have some case like you: it's a problem of filenaming convention
in codeigniter 3 class file names now must be Ucfirst and everything else in lowercase link here

But it's possible it's another thing but verify before it was not a problem with the name of your model.





RE: CI On Subdomain Configuration? - CroNiX - 09-03-2015

Ci isn't looking for files on a "domain", it uses the filepath so everything should still be the same unless you've change your directory structure. As suggested above, check to see if the classnames are ucfirst like CI3 requires.