How To use Query Strings with CodeIgnter (and still have Pretty URLs) |
[eluser]NTICompass[/eluser]
I have query strings enabled, and I still use pretty URLs in CodeIgniter. Using .htaccess, I can rewrite the URLs correctly and also pass query strings to the controllers. The following code is used for my RPX Login library (http://codeigniter.com/wiki/RPX_Login/). Code: RewriteEngine On Basically http://example.com/rpxlogin calls the controller named rpx. When http://example.com/rpxlogin?test=123 is called it is rewritten as http://example.com/index.php?c=rpx&test=123 Hope this helps people. |
Welcome Guest, Not a member yet? Register Sign In |