Jump to content


trq

Member Since 31 Mar 2005
Offline Last Active Jul 26 2015 11:09 AM

Posts I've Made

In Topic: how to make my website fast ?

28 June 2015 - 01:18 AM

The simplest way to gain request-start to request-end speed is to cache using something like akamai.


In Topic: namespace autoloader for custom api

28 June 2015 - 01:15 AM

Composer ships with an autoloader, just stick to one of the standards and use that.


In Topic: PHP developer section

23 December 2014 - 05:12 AM

like wtf?

In Topic: getting $_GET in a framework

22 December 2014 - 03:30 AM

The point I'm trying to make is why have the rewrite at all if you're just going to use normal querystring parameters? I understand you want to force everything through a front controller, but why stop there?

But yeah, you could just use the QSA flag to have apache append existing parameters.
 
RewriteRule ^(.*)$ index.php?uri=$1 [PT,L,QSA]

In Topic: getting $_GET in a framework

22 December 2014 - 03:10 AM

That rewrite rule removes the need for typical GET parameters by making your urls "pretty".

So instead of this:

users/activate-account?email_address=test&token=test
You would use something more like:

users/activate-account/test/test
Of course then you need some sort of "router" to parse and handle these parameters for you.

If this is your own framework you need to decide how your urls are going to be formed.