I'm developing small web application to give access to a URL for authorised users.
After validating the URL, I'm providing the two hyperlinks like Reports and Logout. This is the code.
<a href ="http://hostname.com/reports/users">Reports</a>
<a href="LogoutServlet">Logout</a>
Here the question is the time user click on Reports link, its giving the href link as it is in web browser like http://hostname.com/reports/users
Expected output should be like http://hostname.com/Somethingelse
Update Question:
To hide real folder path i.e http://hostname.com/reports/users
am using .htaccess. I have kept this file under WEB-INF folder, can anyone please hep me how to form RewriteRule and RewriteCond in .htaccess file. This is the file I have tried. If .htaccess is invoking and if it is wrong how come still its going to same folder the time I click on Reports link. This is the .htaccess I have tried
RewriteEngine On
RewriteCond %{HTTP_HOST} ([^\.]+).hostname.com [NC]
RewriteRule ^.*$ http://hostname.com/reports/users [L]