Forum Moderators: phranque

Message Too Old, No Replies

Strange Character in url while redirecting

         

makbd

6:42 am on Mar 30, 2010 (gmt 0)

10+ Year Member



Hi

I using amember plugin for wordpress. When clicked on login link here
example.com/1338/example/

redicted url gets some strange character

example.com/members/login.php?amember_redirect_url=http%3A%2F%2Fwww.example.com%2F1338%2Fexample%2F

for forward slah single and double.

Would you pls guide me to solve this

[edited by: engine at 8:06 am (utc) on Mar 30, 2010]
[edit reason] Please use example.com [/edit]

g1smd

7:18 am on Mar 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Slashes are not valid characters in parameters so must be escaped as shown.

You might want to replace the slashes with some other character for the purposes of using it in the URL, your script then translating them back later.

makbd

7:37 am on Mar 30, 2010 (gmt 0)

10+ Year Member



@g1smd thanks for your reply. Would you please point me urls of article , how to guide to do that or hints me .

I highly appreciate your help

jdMorgan

5:13 pm on Mar 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd suggest that you contact the maker of your 'plug-in,' or post in the WordPress forums.

Your 'login.php' script will need to be modified to accept the encoded characters and then decode them back to ":" and "/" -- possibly using PHP's built-in urldecode function.

As g1smd stated, these characters are *required* to be encoded when transmitted via HTTP, so the solution must be accomplished in the script itself.

Jim