Zerpex Posted March 15, 2012 Share Posted March 15, 2012 Hi, I'm trying to make a header("Location: "); where I want, the url I'm currently on, without any ?id=1 etc, so I get /category/editCategory/ instead of /category/editCategory/?id=1 How can I do that, when I do $_SERVER, sometimes I see one called $_SERVER['REQUEST_URL'] (yep, URL, not URI) - which does exactly what I want, but it's only sometimes I have it :S Is there a nice way of doing it? Best regards, Lucas R. Link to comment https://forums.phpfreaks.com/topic/258971-return-requesturi-without-any-params-howto/ Share on other sites More sharing options...
requinix Posted March 15, 2012 Share Posted March 15, 2012 strtok($_SERVER["REQUEST_URI"], "?") That's the method I use. Link to comment https://forums.phpfreaks.com/topic/258971-return-requesturi-without-any-params-howto/#findComment-1327587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.