Welcome Guest, Not a member yet? Register   Sign In
What are the chars that the url can include?
#1

[eluser]Leo78[/eluser]
Hey,

I am creating a search in my website, the address has to be in this pattern:

Code:
www.domain.com/news/search/query/
www.domain.com/news/search/query/2/

The first pattern is when you are in page number 1 and the second pattern is when you are in page number 2+.

So I created the following code in routs.php:

Code:
$route['news/search/(:any)'] = 'news_ci/sorting/search/$1/1';
$route['news/search/(:any)/([1-9]+)'] = 'news_ci/sorting/search/$1/$2';

The problem is for example the user types www.domain.com/news/query/char/ then he gets a SQL error, I'm pretty sure it's because I use slash in the end of the address. so instead writing (:any) I want to write a pattern which includes all (:any) pattern includes, without the slash.


Messages In This Thread
What are the chars that the url can include? - by El Forum - 08-13-2012, 01:23 PM
What are the chars that the url can include? - by El Forum - 08-13-2012, 05:07 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 03:28 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 05:01 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 05:20 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 08:17 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:18 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:40 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 09:58 PM
What are the chars that the url can include? - by El Forum - 08-15-2012, 10:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB