Routes and GET Query. |
[eluser]pisio[/eluser]
How I can make GET doesn't like this http://localhost/ci/subtitles/search?subs=sads and like this http://localhost/ci/subtitles/search/subs/sads or http://localhost/ci/subtitles/search/sads I try to add in ./system/application/config/routes.php : $route['subtitles/search/(:any)'] = "/subtitles/search/$1"; But doesn't work. How I can make it ? searach_view.php Code: <?php Edit: I think that can be made with .htaccess mod_rewrite ?????
[eluser]WanWizard[/eluser]
Looks like you're constructing the URL yourself in your form. Why not use the 'post' method, and accept a URL like http://localhost/ci/subtitles/search/subs/sads directly?
[eluser]pisio[/eluser]
[quote author="WanWizard" date="1282009785"]Looks like you're constructing the URL yourself in your form. Why not use the 'post' method, and accept a URL like http://localhost/ci/subtitles/search/subs/sads directly?[/quote] More impression. And If i can make it with GET I'll make it with redirect ...
[eluser]WanWizard[/eluser]
Sorry, I don't understand what you're trying to say...
[eluser]pisio[/eluser]
[quote author="WanWizard" date="1282010159"]Sorry, I don't understand what you're trying to say...[/quote] If I can not do it with GET to go / subtitle / search / what is demanded to do what you offered me a redirect.No afraid of too many impressions
[eluser]WanWizard[/eluser]
You can try this rewrite Code: Rewritebase /ci/
[eluser]pisio[/eluser]
[quote author="WanWizard" date="1282011132"]You can try this rewrite Code: Rewritebase /ci/ Code: <IfModule mod_rewrite.c> error 500
[eluser]WanWizard[/eluser]
This one works for me: Code: RewriteCond $1 ^subtitles/search$ This requests Quote:http://test.catwoman.exite.local/subtitl...teststring gives a $this->uri->uri_string of Quote:/subtitles/search/subs/teststring Note: this rewrite has to be placed before the rewrite to index.php, otherwise the first condition will never match.
[eluser]pisio[/eluser]
Ok, at the last this must be look : Code: RewriteEngine on
[eluser]Clooner[/eluser]
[quote author="pisio" date="1282062987"]Ok, at the last this must be look : Code: RewriteEngine on Never thought of this but it is a very clean way to get rid of those get parameters Nice |
Welcome Guest, Not a member yet? Register Sign In |