We have a virtual host file with below content,
NameVirtualHost *:8888
<VirtualHost *:8888>
ServerName example.domain.com
ServerAlias example
DocumentRoot /opt/weblogic/product/virtualhosts/example.domain.com/htdocs
ErrorLog /opt/weblogic/product/virtualhosts/example.domain.com/logs/error_log
RewriteEngine On
#RewriteRule ^/?$ %{REQUEST_URI}/StartPage [R,L]
RewriteOptions Inherit
DirectoryIndex index.html startpage.jsp
<Directory />
Require all granted
</Directory>
</VirtualHost>
We can access the application using server name and alias name.
- http://example.domain.com which expands to http://example.domain.com/StartPage/startpage.jsp
- http://example which expands to http://example/StartPage/startpage.jsp
Now , the requirement is to redirect the url to server name when we use server alias name as below
http://example which expands to http://example.domain.com/StartPage/startpage.jsp
Can some one help me to modify the vhost file to make this work.