Welcome Guest, Not a member yet? Register   Sign In
How remove index.php from URLs? [SOLVED]
#11

[eluser]HSKrustofsky[/eluser]
[quote author="pickupman" date="1279698692"]Dunrobin is correct. I run WAMP locally as well. htaccess should go into same folder as your CI's index.php file.[/quote]

Say the index.php file in is a folder named DCS. Using WAMP the DCS folder would be within the www folder. So does this mean the .htaccess file will need to be in the DCS folder and not the www folder?

'Cause I am having a problem where index.php has been removed, I am able to see the main page, but when I click on a link, it says the page cannot be found. Could me having the .htaccess file in the www folder instead of DCS cause this problem?
#12

[eluser]pickupman[/eluser]
You want the .htaccess to be in your CI installation folder. So, if you have it in DCS, that's where it should be.
#13

[eluser]tomclowes[/eluser]
[quote author="rufnex" date="1274496961"]try this:

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
[/quote]


This works for me whereas the code on the Wiki does not. Could someone perhaps explain how this works?

Thanks
#14

[eluser]Unknown[/eluser]
this is the only .htaccess that worked for me. the one in the user guide should be changed to this. I think it would save a lot of people time/trouble. Additionally if you're having trouble put the .htaccess in the same folder as the "index.php" file (the one thats kind of like the default controller).

Thanks so much rufnex!!!
#15

[eluser]Dhanapal MCA[/eluser]
use .htaccess file
#16

[eluser]Aken[/eluser]
[quote author="spiddy" date="1324210066"][quote author="rufnex" date="1274482561"]try this:

Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
[/quote]

it is not working for me bro. I just copy and paste in my application/.htaccess file, plz give any suggestion[/quote]
Wrong folder. The application/.htaccess should be left alone. You need to create a new .htaccess in your root directory (wherever your index.php file is).

I'm also not sure why they haven't corrected the user guide info for removing index.php yet.
#17

[eluser]CroNiX[/eluser]
They've fixed it in the guide. It just doesn't get updated until the new release of CI, unless you download from github.
#18

[eluser]Aken[/eluser]
True, but still no reason you can't hot fix the current guide to prevent these issues from still cropping up so often.
#19

[eluser]CroNiX[/eluser]
As with a million other bugs and things... Smile
#20

[eluser]Aken[/eluser]
Amen, lol.




Theme © iAndrew 2016 - Forum software by © MyBB