I am confused about the hook_menu.
I want to get argument that contains "/". It seems drupal is using "/" to divide the arguments. But if I have "/" in argument, how can I get it?

eg: http://www.example.com/redirect/http://www.google.com/google=1

you see, the argument that I want is "http://www.google.com/google=1", but I can only get "http:".

is anyone can handle this?

Comments

BladeRider’s picture

You urlencode / urldecode your argument when creating and doing the actual redirect - or perhaps just chain the results of the arg() function together i.e arg(2).arg(3).arg(x) and so on)

criznach’s picture

Look here for the exact rules on URLs.
http://www.w3.org/Addressing/URL/5_BNF.html#z77

According to the spec, path parts are separated by forward slashes, which are reserved for this purpose. So Drupal is doing the right thing.

Although they do work in many cases, colon and forward slash are reserved and shouldn't be used for any other purpose without being escaped. Question mark indicates the start of the "search" part of the path, so it should be escaped too.