Start New Discussion within our Web Development Community

hey i want to encode my website url as a form of security but i have no idea how to go about doing so and help?

is this the correct way the encode a browser url:

    function test()

        $string= '';

Basically i have a website and i want to encode the url when it it shown in the browser.

No, you are mixing Javascript and PHP, not possible.

I think you misunderstand what URL encoding is. You can encrypt parts of an URL, but not the complete one. It's better if you explain WHY you want to do this.

basically i want to encode parts of the url when shown in the browser eg. i wouldnt want the index.php to show. want use it as a means of security

With htaccess you can process all these with a single script, and do the decryption and redirect there. Am lost as to WHY you would want this.

Am not sure WHAT you are trying to secure. Just "securing" some URL parameters doesn't sound like a plan. If you are using sensitive data, use POST, and SSL.

This article has been dead for over six months. Start a new discussion instead.