简体   繁体   English

如何在状态栏中显示与实际网址不同的网址

[英]How to show different url from actual one in status bar

I have the following button that redirects to the given page on button click. 我有以下按钮,可在单击按钮时重定向到给定的页面。 I want that instead of http://localhost:8181/RestServiceProject/index2.html this url showing on the status bar, it shows http://localhost:8181/RestServiceProject/GetDetails 我希望该网址显示在状态栏上,而不是http:// localhost:8181 / RestServiceProject / index2.html这个网址,而是显示http:// localhost:8181 / RestServiceProject / GetDetails

How to do this in html? 如何在html中做到这一点?

 <form action="http://localhost:8181/RestServiceProject/index2.html"> <button type="submit">Get Order Details</button> </form> 

The easies way of doing that would be renaming index2.html to GetDetails.html and changing the action url to GetDetails without any extnsion. 最简单的方法是将index2.html重命名为GetDetails.html,然后将操作URL更改为GetDetails,而无需进行任何扩展。 Next and last thing to do is removing extensions from the url using .htaccess see more info here . 接下来的最后一件事是使用.htaccess从URL中删除扩展名, 请参阅此处的更多信息 Remember that you have to use server which will read your .htaccess. 请记住,您必须使用将读取您的.htaccess的服务器。

That would be done with the server. 那将由服务器来完成。

For example, if you're using an Apache server, using URL Rewrite : http://httpd.apache.org/docs/2.0/misc/rewriteguide.html 例如,如果您使用的是Apache服务器,请使用URL Rewritehttp : //httpd.apache.org/docs/2.0/misc/rewriteguide.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM