Q:

ExpressJS I can't get URL Params beginning with 'http or https'

I want to be able to get a param from my URL that is actually a URL for example :
http://mywebsite.com/new/http://www.url.com

It works just fine with any string but when I pass a URL as param (a string beginning with http) I get this error :
Cannot GET /new/http://www.url.com

Here is my code :
app.param('url', function(req, res, next, url) {
    if (isURL(url)) {
        req.url = url;
    } else {
        res.end('Invalid URL');
    }

    next();
});

app.get('/new/:url', function(req, res) {
    res.end(req.url);
});

var port = process.env.PORT || 8080;

app.listen(port, function() {
    console.log('Listening on port ' + port + '...');
});

Thanks a lot.

A:

ExpressJS automatically parses the url and divide it into segments by '/', you can do the following
app.get('/new/:url*', function(req, res) {

    var urlInTheParam = req.params['url'] + req.params[0];
    //Then you can do you things with the url in the params

});

