Re: How to pass variables to php functions from url's?
| From: | (~~~i LeoNid ~~) | Date: | Fri, 07 Sep 2001 17:07:11 +0000 |
| Subject: | Re: How to pass variables to php functions from url's? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66444@lists.php.net to get a copy of this message | ||
On Fri, 7 Sep 2001 13:28:16 +0200 impersonator of
tmh@intent.n.o.s.p.a.m.dk (\ Tais M. Hansen) planted &I saw in
php.general:
>Hi Martin,
>
>Take a look at the Apache mod_rewrite docs.
>
>http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
>
>
>I added this to my httpd.conf:
>
Or if you don't have access to httpd.conf and/or not mod_rewrite
installed, check to see if you can use .htaccess in your respective
directory with adding there handler (your script) for all these files to
be processed by. See Apache docs, if/how it is possible to pass params.
I didn't use it myself, as my servers don't allow it, but read/lerned s/t.
>---snip---
>RewriteEngine on
>RewriteCond %{HTTP_HOST} ^nu\.osd\.dk$
>RewriteRule ^.*$ http://www.osd.dk/main.php?m=nu
>[R=301,L]
>---snip---
>
>If a user types the URL "nu.osd.dk" it will call
>http://www.osd.dk/main.php?m=nu.
>
>
>--
>Tais M. Hansen
>
>
>
>"Martin Lindhe" <martin@humany.com> wrote in message
>news:831D8A28AF18D5119EAA00E018C5B81C23BA08@MAIL1...
>> I need to solve the following problem, but I can't figure out how:
>> Let's assume we have a server called www.test.com
>> When a user access http://www.test.com/path/username,
>> I want a php script to execute, as if the url entered was
>> http://www.test.com/path.php?value=username.
>> I'm running PHP 4.0.6 on Apache 1.3.20.
>> Thanks!
>> /Martin Lindhe
>
>
i Leonid.