php - Codeigniter URLs showing 404 -


I have a simple web hosting platform, I'm hosting a Codeigniter application on / var / www / html which means That this file structure is:

  html | -Application | --- Controller | --- model | --- view --- config | -public | -System | -Instructions. Php | -htacess   

My .htaccess file looks like this:

  & lt; IfModule mod_rewrite.c & gt; RewriteCond rewrite code% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -d RectitRule ^ (. *) $ Index.php / $ 1 [L] & lt; / IfModule & gt;   

In my config.php file, I have the default Root View Controller:

  $ config ['base_url'] = 'http: // www example .com / ';   

In my routes In the Php file, I have the www in my browser, when I have

  $ route ['default_controller'] = "home"   

When opening mysite.com I get the home / index automatically but when I like any other URL

  www.example.com/home www.example.com/home/index www .example.com / admin   

I get a 404 error It is also worth noting that this folder was completely working on my local machine and another remote server Whistle Did.

To be more precise, I get this error when I try www.example.com/home

  not found Requested URL / Home This server But was not found.   

edit

My home administrator looks like this. Class Home Expands CI_Controller {Public Function __construct () {Origin: __ Construction (); } Public Function Index () {$ this- & gt; Load-> View ('home_view'); } Public functions some functions () {echo 'in some functions'; }}

edit

I do not think if it adds index.php to the URL, then

  www. Example.com/controller/function (does not work) www.example.com/index.php/controller/function (WORKS)   

You need to specify the operation for individual URLs in the root file. For Site.com/search, add it before $ [[default_controler '] = "home",

  $ route [' search '] = "home / search"  .  

What this means, you will create a function search in your home controller which will load the visible files for the specified URL.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -