![]() |
anchorlinks not working on live site - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: anchorlinks not working on live site (/showthread.php?tid=18396) Pages:
1
2
|
anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]learning_php[/eluser] Hi, I have put my site live but none of the links seem to be working? and i cannot navigate away from the home page? I link to other pages like so: Code: <li><?= anchor('info','Information');?></li> anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]Dam1an[/eluser] Have you changed the base_url in your config file? Whats the link it generates? (view source or what appearce in the status bar when you hover over the link) anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]learning_php[/eluser] I changed the base url to Code: $config['base_url'] = 'http://www.wesayido.co.uk/'; Code: <li><a href="http://www.wesayido.co.uk/info">Information</a></li> Code: http://www.wesayido.co.uk/info anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]Dam1an[/eluser] Hmm... Seeing as the links are rendered correctly, and assuming they're clickable and the page reloads, I'd be tempted to say its something with you .htaccess file perhaps? Maybe try renaming that (so it doesn't execute) and try a URL (including the index.php) anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]TheFuzzy0ne[/eluser] Try changing uri_protocol in config.php to REQUEST_URI or QUERY_STRING. If that doesn't work, please post you're htaccess file and any routes you might have. anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]learning_php[/eluser] when i change it to a REQUEST_URI i get a 404 error? here is my .htaccess Code: <IfModule mod_rewrite.c> and my routes Code: $route['default_controller'] = "homepage"; anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]rogierb[/eluser] why use RewriteBase /http://www.wesayido.co.uk/? RewriteBase / should be enough since you want to route to the root anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]learning_php[/eluser] i have changed that line now this one works Code: $route['gallery'] = "gallery/index"; anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]learning_php[/eluser] hi, just reuploaded the routes file to the server and all seems to be working. Thanks for all your help anchorlinks not working on live site - El Forum - 05-05-2009 [eluser]CroNiX[/eluser] I had this problem as well. I found the problem was in the htaccess and using your line: RewriteRule ^(.*)$ /index.php/$1 [QSA,NC,L] I had to change mine to: RewriteRule ^(.*)$ /index.php?/$1 [QSA,NC,L] Adding the (?) after index.php Not sure why....but it fixed it and maybe it will work for you too. |