Welcome Guest, Not a member yet? Register   Sign In
htaccess
#1

[eluser]natefons[/eluser]
im not sure if im doing this right...but im trying to remove the index.php from needing to be present during controller calls,

reading through the user guide, i see that in order to do that, you add the following to the htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

however for some reason, everytime i add the following code, i get a 500 server error when i try to view my site (on a local machine, using apache)

anything im doing wrong?
#2

[eluser]haydenk[/eluser]
Check out this out for a new updated htaccess.

For this one though, your htaccess is fine, you need to edit your config.php
Code:
$config['index_page'] = "index.php";

should be changed to
Code:
$config['index_page'] = "";


Try using this minor adjustment if that one is not working
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
Notice the ? after index.php
#3

[eluser]Unknown[/eluser]
[quote author="haydenk" date="1280482688"]Check out this out for a new updated htaccess.

For this one though, your htaccess is fine, you need to edit your config.php
Code:
$config['index_page'] = "index.php";

should be changed to
Code:
$config['index_page'] = "";


Try using this minor adjustment if that one is not working
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
Notice the ? after index.php[/quote]

Could you please explain what the ? mark after index.php indicate, why is this required
#4

[eluser]haydenk[/eluser]
Honestly, it's been awhile since I tried that addition, so I do not recall the reason why it works.

I just remember when I switched web hosts, all of a sudden my rewrite rules were not working and when I googled for information, this was one of the suggestions that was made and it worked.

Sorry.
#5

[eluser]natefons[/eluser]
well that worked...but it broke my methods..haha

for some reason,methods didnt work after that..
#6

[eluser]haydenk[/eluser]
There is actually a whole new set of rewrite rules CI put out lately too. It's more like wordpress now. Check out the link I posted in the first reply.
#7

[eluser]natefons[/eluser]
yea i followed them all except for 3...it was a bit confusing and i wasnt sure what that as asking for.
not sure ifthat was the problem.

but when i applied 1-2,4+5 from the link you provided, it DID remove the index.php, but my functions/methods didnt work using the /function/ methods.




Theme © iAndrew 2016 - Forum software by © MyBB