Page 1 of 1

Passing parameters in URL but without mentioning the PHP

Posted: Sat Dec 18, 2010 4:07 am
by teominator
Hi,

i'm new here. My question is: can i use PHP to handle parameters sent this way

http://bit.ly/12323 (where i consider 12323 the parameters)

rather than this way?

http://example.com/somephpfile.php?param=value

Thanks,
Teo

Re: Passing parameters in URL but without mentioning the PHP

Posted: Sat Dec 18, 2010 4:09 am
by parino_esquilado
Yes, you can, editing the apache.htaccess file.

Rewrite Engine:

RewriteRule ^([A-Za-z0-9_-]+)\$ somefile.php?value=$1 [L]

Re: Passing parameters in URL but without mentioning the PHP

Posted: Sat Dec 18, 2010 4:12 am
by internet-solution
you will need mod_rewrite in apache see examples here

Re: Passing parameters in URL but without mentioning the PHP

Posted: Sat Dec 18, 2010 4:15 am
by parino_esquilado
Yeah, that's it. Mod_rewrite =)