Hi all. I am trying to code a bash script that will generate a redirect page based on a couple of questions but im having trouble. I have included the code below. When run all it ouputs is this:
Enter the domain name you would like to redirect from, eg owa.alexfoti.com
Enter the URL that you want to redirect to, eg http://126.96.36.199/exchange
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN>
<meta http-equiv=REFRESH content=0
It does not write to the file....
Thanks in advance for all the help.
echo "Enter the domain name you would like to redirect from, eg owa.alexfoti.com"
echo "Enter the URL that you want to redirect to, eg http://188.8.131.52/exchange"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv="REFRESH" content="0;url=$redirecturl"></HEAD>
" > "/opt/lampp/htdocs/$domaininame/index.html"
echo " done :)"