I already know that to open a webpage with the default browser you use:
start www.google.com
. However, I'm trying to open a URL that contains a '&' in it for example:
https://www.google.dz/?gws_rd=cr,ssl&ei=rXc_WYq3Msy2abGXpugH#safe=off&q=hello+world
If I use:
start https://www.google.dz/?gws_rd=cr,ssl&ei=rXc_WYq3Msy2abGXpugH#safe=off&q=hello+world
It will not work because there is a &
For example, to encode a URL with an ampersand character, use %24. However, in HTML, use either & or &, both of which would write out the ampersand in the HTML page.
Replace ampersands with “&” Replacing the ampersand characters with encoded equivalents does not change the functionality of the query string, but it does produce completely valid code.
You can use the HH command to open any website. Though it will not open the website in the browser, but this will open the website in an HTML help window. works great to just hit a website to log an IP or kick off a script.
&
is a special character in bash, so if the URL contains a special character you just have to do it like this:
start "" "your url"
You have to escape the Ampersand (&) character with the ^ character in every occurrence of it.
start https://www.google.dz/?gws_rd=cr,ssl^&ei=rXc_WYq3Msy2abGXpugH#safe=off^&q=hello+world
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With