htaccess issues |
[eluser]jordanarseno[/eluser]
Hey everyone, I'm working on removing the 'index.php' from my URLs. It's only half working right now - hopefully somebody can help! First off, my project is called machinev2 - and here's my file structure... I've moved the codeigniter_system and project application folder outside of the server root for security purposes: WAMP codeigniter_system machinev2_application www machinev2 (other projects) This structure allows me to keep the same codeigniter system folder for all projects I've modified my main index.php file inside of the machinev2 directory to point to the codeigniter_system and machinev2_application directories (which of course, include the CI core, and all of my m's v's and c's!) I followed the instructions listed here: http://codeigniter.com/wiki/mod_rewrite/ for a mod_rewrite - and I've placed the .htaccess file inside of the machinev2 folder. It works - but it only works on my home page. When users are not logged into machinev2 web portal, they are redirected to a login controller. Thus, with htaccess they are sent to localhost/machinev2/login. All is good. Now, when I click other links - for example, I have a forgot your password link that is linked to a 'forgot' controller. When I click this, and other links - my URL craps out with index.php in it again: localhost/machinev2/index.php/forgot. How can I make the changes propagate across all controllers? Thanks and Cheers, JoAr
[eluser]Daniel Moore[/eluser]
Take a look at the following tutorial page on this and see if it helps to solve your dilemma. http://www.danielwmoore.com/remove_index...odeigniter
[eluser]Gerep[/eluser]
Hi, this is my .htaccess file. I work exactly like you and its working fine for me. Take a look at the RewriteBase it was a damn problem to me a few days =) Code: <IfModule mod_rewrite.c> Hope it helps.
[eluser]Rob @ iFetch[/eluser]
[quote author="thelctrclengnr" date="1292491932"]Now, when I click other links - for example, I have a forgot your password link that is linked to a 'forgot' controller. When I click this, and other links - my URL craps out with index.php in it again: localhost/machinev2/index.php/forgot. How can I make the changes propagate across all controllers? Thanks and Cheers, JoAr[/quote] Is CI generating these links for you (i.e. are you using the base_url or site_url functions? If so, have you correctly set `$config['index_page'] = "";`?
[eluser]jordanarseno[/eluser]
Thanks everyone - I was able to get things working through Gerep's code. Your code initially posed identical problems as the original CodeIgniter wiki suggestion. I found many static references to 'index.php' in my code - I've removed them and it works great. Thanks all! Cheers and Happy Holidays JoAr |
Welcome Guest, Not a member yet? Register Sign In |