CodeIgniter Forums
from main folder to subfolder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forum-9.html)
+--- Thread: from main folder to subfolder (/thread-64063.html)



from main folder to subfolder - ofir - 01-09-2016

hello i install codeigniter and its work before (in the main folder), now i want in the main folder wordpress, but i want to transfer all the fils to anew folder with name cms..

i done this but only the main controller work (the login page ), after i am try to login its say my error 404 page not found... and its worked before i transferred to the cms folder ... what i need to do ?


RE: from main folder to subfolder - PaulD - 01-09-2016

In the main config file you have to add the subfolder route to base url.

Code:
$config['base_url'] = 'https://www.mydomain.co.uk/subfolder/';

Hope that helps,

Paul.


RE: from main folder to subfolder - ofir - 01-10-2016

i did it but its not work
http://www.agri-da.com/cms
try to login and see in the console that you get

http://www.agri-da.com/cms/login/validate Failed to load resource: the server responded with a status of 404 (Not Found)

and in the controller login i have function call validate ...
its only not work in cms folder , in the main folder its worked before


RE: from main folder to subfolder - PaulD - 01-10-2016

Firstly, to remove any confusion, try creating a controller called Test or similar, and in that controller just load a single test view, that has <p>Hello world</p> in it.

Can you link to that page http://www.agri-da.com/cms/test

If you can then the problem is in your code, if you cannot then the problem might be your .htaccess (I presume your server is reading and using your .htaccess file).

Paul.

PS Had a quick look at your page and your form does not submit anywhere, your html is not correct.


RE: from main folder to subfolder - ofir - 01-10-2016

not work maybe its in the configuration on codeignitor or wordpress..
what i can check more?


RE: from main folder to subfolder - PaulD - 01-11-2016

It might be that wordpress is trying to rewrite the url.

In wordpress .htaccess make sure that your sub folder is exluded from any wordpress directives.

You may have to google for how to do that as I am not a .htaccess expert at all and can't give you any example code.

http://stackoverflow.com/questions/1848500/htaccess-mod-rewrite-how-to-exclude-directory-from-rewrite-rule


RE: from main folder to subfolder - ofir - 01-13-2016

I try to delete the files of wordpress but its still not working the codeignietor in ths sub main folder ... only the the main controller worked