RE: [PHP] How to protect JavaScript?
| From: | Bart Brinkmann | Date: | Wed, 16 Jan 2002 14:56:38 +0000 |
| Subject: | RE: [PHP] How to protect JavaScript? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80716@lists.php.net to get a copy of this message | ||
Here's a good primer on mod_rewrite:
http://www.freebsddiary.org/rewrite.php
I used it to accomplish the following...
A user hits a url of say: http://foo.com/84838
I then want to return an object out of our database who's id is 84838. A 404
handler will not help in this case. So, I chose to use mod_rewrite. Anytime
/\d+$ is requested, I use mod rewrite to redirect to a php page that fetches
the object.
Thus a request for:
http://foo.com/84838 redirects to:
http://foo.com/object?id=84838
The user does not see the redirect, their url will remain
"http://foo.com/84838".
Check out the primer above, it's pretty straght-forward.
/bart
-----Original Message-----
From: Martin Thoma [mailto:martin@radiok2r.de]
Sent: Wednesday, January 16, 2002 9:47 AM
To: php-general@lists.php.net
Subject: Re: [PHP] How to protect JavaScript?
Hi Bart,
thanx for your answer.
> This would only be true if your javascript files were parsed with php.If
> not, then php can't do anything about it of course.
This is possible, I tried it out.
> Look into mod_rewrite. I
> haven't used it in the sense that you're looking for, but I don't see why
> you couldn't.
>
> http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
This is a lot of stuff... Could you give me a hint where the way leads to?
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net