CodeIgniter Forums
htaccess problems - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: htaccess problems (/thread-1775.html)



htaccess problems - El Forum - 06-26-2007

[eluser]St0neyx[/eluser]
Hi,

I'm not that good with htaccess files so i copied mine from the forum.

my htaccess code
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|css|font|images|includes)
RewriteRule ^(.*)$ /index.php/$1 [L]

This code makes the index.php disapear from the url.
example
www.site.com/index.php/controller/function/segments
after htaccess
www.site.com/controller/function/segments

now i also want this in my url
www.site.com/controller?blaat=blaat

this is not accepted, how can i make this acceptable?
in the config ? is an allowed char for the url.

I don't want to piss people off, but dont come with solutions like
why don't u just do www.site.com/controller/blaat
because thats not what i need..


htaccess problems - El Forum - 06-26-2007

[eluser]batteries[/eluser]
look under the section "Enabling Query Strings" here


htaccess problems - El Forum - 06-26-2007

[eluser]marcoss[/eluser]
[quote author="St0neyx" date="1182887671"]don't want to piss people off, but dont come with solutions like why don't u just do www.site.com/controller/blaat because thats not what i need..[/quote]

CodeIgniter uses a segment-based approach, you have the option to enable query-string-based URL's if you need them, but (in the current version) you can`t use both combined.

If you really need this feature you may want to take a look into the BlueFlame code to see how it's been implemented.


htaccess problems - El Forum - 06-26-2007

[eluser]linuxbz[/eluser]
[quote author="marcoss" date="1182903497"]
If you really need this feature you may want to take a look into the BlueFlame code to see how it's been implemented.[/quote]

BlueFlame has been renamed. The above URL should be
Kohana instead.