I am working on re-directing user to a default page when they arrive on the landing page with a specific URL and I was wondering what will be the best to get the value after hash.
example: Landing page URL is: http://www.google.com but when user visits http://www.google.com/#puppies they will be re-directed to http://www.google.com/admin/signup
I have created a custom module called my-redirect and the code for index.js looks like below
module.exports = {
construct: function(self, options) {
self.pageBeforeSend = function(req, callback) {
console.log("URL",req.absoluteUrl);
return callback(null);
};
}
};
The issue is that the console.log just prints http://www.google.com even when the user visits http://www.google.com/#puppies
How do I get the value puppies in the example above?