Welcome Guest, Not a member yet? Register   Sign In
how to implement dynamic "routes"?
#13

[eluser]narkaT[/eluser]
[quote author="narkaT" date="1221189446"]but post values aren't "copyable", and creating such "aliases"
should be as easy as it could.

copy an URI and assign it to an alias.[/quote]
that's the mission Wink


The params that'll get passed per URI could look like this:
Quote:VON=1221602400&BIS=1225148400&RA=2&KA1=18&KA2=18&KA3=18&VA=0&ZA=0&DAUER=0,0&PREIS=0,0
or this:
Quote:ZIEL=PMI&VON=1221602400&BIS=1225148400&RA=2&KA1=18&KA2=18&KA3=18&VA=0&ZA=0&DAUER=0,0&PREIS=0,0
or even like this:
Quote:ZIEL[]=PMI&ZIEL;[]=PMA&VON=1221602400&BIS=1225148400&RA=2&KA1=18&KA2=18&KA3=18&VA=0&ZA=0&DAUER=0,0&PREIS=0,0

The future users of this application have to be able, to create such mappings
by just copying the uri they want to "map" into an "admin utility".
parsing and rewriting an htaccess-file will be a bit tricky, but the point is:
how will a htaccess perform with ~50 to 100 rewrite-rules in it?

an "automatically" genreated rewrite rule would probably look like this:
Code:
RewriteRule ^pmi\.html$  /index.php/Functions/Search?ZIEL=PMI&VON=1221602400&BIS=1225148400&RA=2&KA1=18&KA2=18&KA3=18&VA=0&ZA=0&DAUER=0,0&PREIS=0,0 [NC]



the annoying fact about my current "solution" is, that the connection to the database is made twice.
the pre_system-hook gets executed too early to use the CI base, so the DB objekt in
the hook is independent from the core... :roll:


I'm thinking of combining the htaccess and the database-cached-searches
into a more effective system.

thank you for all the ideas so far Smile

Greetings
Jan


Messages In This Thread
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 05:42 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:11 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 07:53 AM
how to implement dynamic "routes"? - by El Forum - 09-10-2008, 08:09 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 05:32 AM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 12:24 PM
how to implement dynamic "routes"? - by El Forum - 09-11-2008, 04:17 PM
how to implement dynamic "routes"? - by El Forum - 09-12-2008, 07:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 07:19 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 10:58 AM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:23 PM
how to implement dynamic "routes"? - by El Forum - 09-15-2008, 01:25 PM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 03:06 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 05:55 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 06:41 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 07:03 AM
how to implement dynamic "routes"? - by El Forum - 09-16-2008, 11:54 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 01:44 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 07:56 AM
how to implement dynamic "routes"? - by El Forum - 09-17-2008, 09:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB