[SOLVED] Rewrite only one thing |
[eluser]stuffradio[/eluser]
How can I make it so I only have to handle one thing for rewriting and have everything else work properly without index.php? This is my routes page: Code: $route['default_controller'] = "url"; I'm trying to get the url/geturl($any) to work without typing anything, but it only works when I type url/geturl/blah. So I want http://myurl.com/blah to route to Code: $route['(:any)'] = "url/geturl/$1"; but it's not doing it. Here is my htaccess file Code: DirectoryIndex index.php
[eluser]n0xie[/eluser]
Your description of what you are trying to do is rather vague, but if I understand correctly you want all requests to go to one controller/function? Code: domain.tld/foo -> domain.tld/url/geturl/foo If so this should work: Code: RewriteRule ^(.*)$ ./index.php/url/geturl/$1 [L,QSA]
[eluser]stuffradio[/eluser]
If someone goes Code: domain.tld/foo Code: domain.tld/url/geturl/foo Otherwise treat everything else normally. Edit: Never mind, you solved it for me. I removed the routes and used that in the htaccess and it works Thanks! |
Welcome Guest, Not a member yet? Register Sign In |