I have set up a ubuntu server with apche 2 installed, I already have a windows server 2003 installed with Zywall firewall installed, I successfully started Apache2 in Ubuntu server and it is running, Now I need help in URL redirection, here is what i needed. Whenever user typed in particular URL the firewall should be configured in such a way that it should point to the Ubuntu server ip from which the page will be loaded, I understand that the virtual host should be configured this, can you help which file needed to be changed in apache for url redirection in a secure way. Thankyou.
Asked
Active
Viewed 40 times
1 Answers
1
$ vi .htaccess
Append following config code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]
Save and close the file. Above code will redirect users to www.domain.com url.
Abhishek Anand Amralkar
- 1,949
- 12
- 16