Welcome Guest, Not a member yet? Register   Sign In
Routing 'page.php?a=1&b=2'
#1

[eluser]iConTM[/eluser]
Can I do something like this?

Code:
$route['gotoartik.php\?articID=(:num)'] = "articles/article/$1";

This didn't work for me.

Greetings
#2

[eluser]Nick_MyShuitings[/eluser]
That would depend a lot on you configuration settings for the paths. Whether you have enabled query strings or not. I had q nightmare of a time working with query strings for a twitter oauth integration and from what I recall the routing class and configuration are not built to handle them. Run a find in all files for the $_GET and you will find some treating stuff.

My dev box is dead or I'd try and find some examples of my tests. For now I am stuck forum crawling from the iPod. Mind if I ask why you need that route? Is it due to an interface with another app that only supports query strings? What I did once was add a mod early in the ci cycle processing cycle was to rewrite the URL turning the query string into a uri. Also, a fancy htacess might be your friend here.
#3

[eluser]Sinclair[/eluser]
Something like this? http://theviceprogrammer.com/?p=159
#4

[eluser]iConTM[/eluser]
I'm looking for a way to redirect the old urls of a webpage to the new urls (url friendly)

so

gotoartik.php?articID=1

needs to be converted to:

articles/article/1

thanks for the comments
#5

[eluser]iConTM[/eluser]
[quote author="Sinclair" date="1283889855"]Something like this? http://theviceprogrammer.com/?p=159[/quote]

this doesn't work Confused

I also tried to put a rule in a .htaccess file:

something like

Code:
RewriteEngineOn
RewriteRule getArtik.php\?articID=([0-9]+) articles/article/$1

but I get an error cause of the questionmark

when I remove the questionmark it works:

Code:
RewriteRule getArtik.phparticID=([0-9]+) articles/article/$1




Theme © iAndrew 2016 - Forum software by © MyBB