Redirecting to a URL

Can someone help me with the redirecting thing? Like if we click a button I want it to get directed to a URL, so is there any method or command by which I can do it?
Make sure to drop your solutions.


Are you looking for window.location.href in Javascript?

No, i'm looking for luci.http.redirect and i want to redirect to some url for example after clicking a button

Redirect from what and whose URL to what? And what button? Are you looking for MITM?

1 Like

So the use case is like, we have a page in which we have a download button and when we click that button the file should get downloaded, so for this say we have an URL say Now once we hit that button it should redirect to the URL from where the file is getting downloaded. So i wanted to know can we do this redirecting thing when the URL is known?

How is your question related to OpenWrt? Would you like OpenWrt to intercept the HTTP request and redirect to another location (i.e. MITM)?

Can you explain your purpose? This is probably an XY Problem.

yes, so I'm working on access point frontend part and it is a openWrt

Are you looking for captive portal?

No, i think I'm not able to make you understand my problem