htaccess works on home server but not on hosting account |
[eluser]Ludatha[/eluser]
Hello, I have my own server (a box running windows with WAMP on it ) My CodeIgniter site runs fine on the box, but when I uploaded it to my hosting account the htaccess doesn't work, they use Apache 1.2 or 1.3, can't remember. I have apache 2. On my hosting account, the only to see anything is to go to http://ludatha.com/index.php/profile/ with the index.php in it, with it, I get a 404, not by codeigniter. I also can't get to the homepage at http://ludatha.com/ but I can with the index on the end This is the htaccess file: Code: RewriteEngine on Can anyone help? - Adam
[eluser]Mike L[/eluser]
Try this instead Code: Options +FollowSymLinks That should work fine. Also, if you installed your site in a sub directory (ex: http://example.com/mysite) add "mysite" to the end of RewriteBase like this: Code: RewriteBase /mysite
[eluser]nzmike[/eluser]
Perhaps mod_rewrite is not enabled in apache. Make a file that prints out the function phpinfo(). e.g. Code: <?php Under Loaded Modules in the apache section make sure mod_rewrite is listed.
[eluser]brianw1975[/eluser]
check that you have AllowOverride All in your host config file for the public web directory
[eluser]Ludatha[/eluser]
Mike L: That made my homepage load but none of the links... This is my phpinfo, mod_rewrite is loaded because I have used it for many other things. http://ludatha.com/info.php
[eluser]nzmike[/eluser]
I'm not sure what's wrong with your set-up but you probably shouldn't allow people to view you phpinfo page. It makes it very easy for a hacker to find the security holes on your server.
[eluser]Ludatha[/eluser]
I just found out that 'The AllowOverride directive in the Apache's configuration has been set to ‘All’ on all servers.'
[eluser]Mike L[/eluser]
[quote author="Ludatha" date="1252247403"]Mike L: That made my homepage load but none of the links... This is my phpinfo, mod_rewrite is loaded because I have used it for many other things. http://ludatha.com/info.php[/quote] Oh, I forgot to tell you a step :lol: In your config file system/application/config/config.php Change this line. Code: $config['index_page'] = "index.php"; To this Code: $config['index_page'] = "";
[eluser]derekmichaeljohnson[/eluser]
[quote author="Ludatha" date="1252247403"]That made my homepage load but none of the links...[/quote] Whenever I have a CI app on someone else's server and this happens, I adjust the following line in the config.php file: Code: $config['uri_protocol'] = "AUTO"; Code: $config['uri_protocol'] = "REQUEST_URI";
[eluser]Ludatha[/eluser]
Thanks, I tried all your ideas but the homepage loads but the links still need index.php in them to work... |
Welcome Guest, Not a member yet? Register Sign In |