.htaccess on an https server |
I am using codeigniter 3.1.11 for a school project. Locally, I have set-up this .htacces file
Code: <IfModule mod_rewrite.c> With these settings : PHP Code: $config['base_url'] = 'http://localhost/codeigniter'; Locally, the rules work (i.e: localhost/codeigniter/welcome) takes me to the welcome page. However, these same rules, do not work on the student server provided by my school. Even after I have adapted everything, I still need to put index.php in the URL PHP Code: $config['base_url'] = 'https://'.$_SERVER['SERVER_NAME'].'/codeigniter'; If i try to access the welcome controller the same way I did locally, I only get back Code: File not found. on the browser. The servername follows this logic : studentNumber.SCHOOL_SERVER.com (connected via school vpn) Any ideas? Thanks
The baseurl should have a trailing slash:
`$config['base_url'] = 'http://localhost/codeigniter/';` use absolute path on production like this: `'http://school_server.com/codeigniter/';` |
Welcome Guest, Not a member yet? Register Sign In |