Admin folder in subfolder not working... |
Hello guys,
Here's the thing. I've created the main application in the subdomain sub.domain.com and i've placed another admin ci application in sub.domain.com/admin/. The problem is that when i'm trying to access the subfolder what i get is a 404 error "not found" page. Here's the .htaccess of the admin application: Code: RewriteEngine On The config.php base_urls: Code: /* And here's the routes.php (note: I've placed the controllers in subfolders): Code: <?php I've searched all over the net and i cant find anything useful.. Thanks... //Life motto if (sad() == true) { sad().stop(); develop(); }
As i mentioned above yes! It is located in subdirectory.. When i type the subdirectory URL i get a 404 not found page..
//Life motto if (sad() == true) { sad().stop(); develop(); }
Did you try adding the RewriteBase to your .htaccess file?
Code: RewriteEngine On What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
@HarrysR,
I think that your config file is wrong. I think that.... $config['base_url'] = 'https://sub.domain.com/admin/'; should be: $config['base_url'] = 'https://sub.domain.com'; My understanding of subdomains is that when calling the subdomain you use... sub.domain.com and domain.com/admin not sub.domain.com/admin I have a subdomain on one of my accounts and the url links listed above (minus the last one) are the ones I use and they work perfectly. When I type sub.domain.com/admin I get an 404 error message too.
@php_rocs
If i do this i get redirected to the main website. I forgot to mention that in my header i have this script, in order to prevent users that are not admins to enter the admin panel and if the user is not logged in to redirect him in homepage... if (!$this->ion_auth->logged_in() && $this->uri->segment(1) !== 'login') { redirect('login'); } elseif($this->ion_auth->logged_in() && !$this->ion_auth->is_admin($this->ion_auth->get_user_id())){ redirect('logout'); } //Life motto if (sad() == true) { sad().stop(); develop(); } |
Welcome Guest, Not a member yet? Register Sign In |