CodeIgniter Forums
.htaccess - Why the ? - 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: .htaccess - Why the ? (/showthread.php?tid=18300)



.htaccess - Why the ? - El Forum - 05-01-2009

[eluser]spmckee[/eluser]
Greetings,

I have noticed that nearly every example of an .htaccess file used to eliminate the index.php from the URI reads as following:
Code:
RewriteRule ^(.*)$ index.php/$1 [L]

This however doesn't work for me. I have to add a "?" like so:

Code:
RewriteRule ^(.*)$ index.php?/$1 [L]

Have I missed something and will this cause issues down the line?

Thanks,
SP


.htaccess - Why the ? - El Forum - 05-01-2009

[eluser]Daniel Moore[/eluser]
Generally the server configuration your site is hosted on will determine whether or not you need to add the ?.

For more detailed information, see the link in my signature about removing the index.php using htaccess. A highly documented .htaccess file is included with most conceivable needs.