error 404 when specifying explicitly the controller |
[eluser]sebastien14[/eluser]
Hi, I am using code Igniter 1.7.0 and enjoy it. I was working on a local machine (WAMP). Everything is working fine. I could access to the welcome controller either thru : /mysite/index.php/welcome or thru /mysite/index.php When I tried to move it to my remote server (and editing the config file 'base_url' accordingly) : I was able to acess to the welcome controller only thru /mysite/index.php. It is not possible to access it thru /mysite/index.php/welcome. Obviously the welcome controller is just for the example. All of my other controllers are not accessible either. Do you have a clue ? Thanks in advance. Regards. Sebastien
[eluser]MMacdonald[/eluser]
I think you've forgotten to update your .htaccess file (done this many times myself). I'm guessing you moved from something like http://localhost/site/ to http://www.yourdomain.com/ If so, you need to change Code: RewriteRule ^(.*)$ /site/index.php/$1 [L] to Code: RewriteRule ^(.*)$ /index.php/$1 [L] in your .htaccess. Does this help? Mark
[eluser]new developer[/eluser]
I was about to tell the same...but was not confident as i am new developer..but should be a .htaccess problem.
[eluser]sebastien14[/eluser]
Hi, Thanks for your responses. I am not using mod_rewrite at all. First thing : ------------- I have remade a fresh installation on another local PC using WAMP. The mod_rewrite is disable. Both : http://localhost/multiQ/index.php and http://localhost/multiQ/index.php/welcome Gives me the correct pages (Welcome to CodeIgniter! ... blah blah blah.) So not using mod_rewrite does not seem to be a problem. Second thing : -------------- On the server the mod rewrite is not enabled either. I have checked this using the examples given in : http://www.wallpaperama.com/forums/how-t...d-t40.html The mod_rewrite is not enabled. Third thing : ------------- I have re-installed from fresh the codeigniter with my application on the server. still https://www.mydomain/site/ https://www.mydomain/site/index.php gives me the correct pages connected to the welcome controller. but https://www.mydomain/site/index.php/welcome is not working giving me a The requested URL /site/index.php/welcome was not found on this server. I am quite puzzled since it can connect to the controller using the url https://www.mydomain/site/index.php ??? Do you have some more clues ? Thanks . Sebastien
[eluser]sebastien14[/eluser]
Hi, Another try : ------------- Just to be sure, I have just downloaded a plain (and new) CodeIgniter 1.7 code on the CodeIgniter server. => same problems another try ++ --------------- I have also tried all the 4 possibilities in the config.txt : / //$config['uri_protocol'] = "AUTO"; $config['uri_protocol'] = "PATH_INFO"; //$config['uri_protocol'] = "REQUEST_URI"; //$config['uri_protocol'] = "ORIG_PATH_INFO"; //$config['uri_protocol'] = "QUERY_STRING"; => same problems. Do you have some ideas ? regards. Sebastien.
[eluser]sebastien14[/eluser]
Hi, Just to finish the thread, I have added a ? after the index.php for this to work. I found the answer in the troubleshooting. Regards. Sebastien14 |
Welcome Guest, Not a member yet? Register Sign In |