CodeIgniter Forums
Rewrite codeigniter url with modrewrite apache - 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: Rewrite codeigniter url with modrewrite apache (/showthread.php?tid=48201)



Rewrite codeigniter url with modrewrite apache - El Forum - 01-08-2012

[eluser]ghst[/eluser]
Hi.
I have link that is sent to my server and cant be changed from other side.
Link is like:

Code:
http://sms.example.com/sms.php?phone=12345678&msg=msg15&code=777&country=cc&oper=someoper&mssid=1234567892&date=11111&keyword=msg

How can i Add to link Controller and Method GET variables so CI can parse link?

i need to add
"index.php?c=sms&m=doParse"

So that in end link will be like
Code:
http://sms.example.com/index.php?c=sms&m=doParse&phone=12345678&msg=msg15&code=777&country=cc&oper=someoper&mssid=1234567892&date=11111&keyword=msg

Tried to do
Code:
RewriteRule ^sms\.php$ /index\.php?c=sms&m=doParse [L]
but it looses all GET variables.

Thanks.